Function at 0x4dc680
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x5bc684]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, esi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dc6a0
sub eax, edx
add eax, 0xe
push eax
call fcn.004fc6be
mov ebx, eax
mov edx, ebx
add esp, 4
mov dword [ebp - 0x120], ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4dc6c3
lea eax, [ebx - 1]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4dc6d0
mov ecx, dword [str.wf_update.xml]
mov dword [eax], ecx
mov edx, dword [0x578094]
mov dword [eax + 4], edx
mov ecx, dword [0x578098]
mov dword [eax + 8], ecx
mov dx, word [0x57809c]
mov word [eax + 0xc], dx
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dc702
xor esi, esi
push esi
push esi
push 3
push esi
push 3
push SysReAllocString
sub eax, edx
push ebx
mov byte [eax + ebx + 0xd], cl
mov dword [ebp - 0x114], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x110], eax
cmp eax, 0xffffffff
je 0x4dc8f1
push edi
push 0x105
lea eax, [ebp - 0x10c]
push esi
push eax
call fcn.005067df
mov eax, dword [ebp - 0x110]
add esp, 0xc
xor edi, edi
push edi
lea ecx, [ebp - 0x118]
push ecx
push 0x104
lea edx, [ebp - 0x10c]
push edx
push eax
mov dword [ebp - 0x118], 0x104
mov dword [ebp - 0x11c], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4dc8e3
jmp 0x4dc796
mov esi, dword [ebp - 0x128]
mov eax, dword [ebp - 0x118]
test eax, eax
je 0x4dc8d6
cmp dword [ebp - 0x11c], 0
jne 0x4dc8d6
lea esi, [esi + eax + 1]
push esi
mov dword [ebp - 0x128], esi
call fcn.004fc6be
push esi
mov ebx, eax
push 0
push ebx
call fcn.005067df
add esp, 0x10
test edi, edi
je 0x4dc7f3
mov edx, ebx
mov eax, edi
sub edx, edi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4dc7e0
push edi
call fcn.004fedfc
add esp, 4
lea eax, [ebp - 0x10c]
mov esi, eax
jmp 0x4dc800
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4dc800
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4dc810
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push str._updatestring_string_
push ebx
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x124], ebx
call fcn.004ff5b7
mov esi, eax
add esp, 8
add esi, 0x16
je 0x4dc88a
push 0x578074
push esi
call fcn.004ff5b7
add esp, 8
test eax, eax
je 0x4dc88a
sub eax, esi
mov ebx, eax
lea edi, [ebx + 1]
push edi
call fcn.004fc6be
push edi
push 0
push eax
mov dword [ebp - 0x114], eax
call fcn.005067df
mov ecx, dword [ebp - 0x114]
push ebx
push esi
push ecx
call fcn.0050332c
add esp, 0x1c
mov dword [ebp - 0x11c], 1
push 0x105
lea edx, [ebp - 0x10c]
push 0
push edx
call fcn.005067df
mov edx, dword [ebp - 0x110]
add esp, 0xc
push 0
lea eax, [ebp - 0x118]
push eax
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [ebp - 0x120]
mov edi, dword [ebp - 0x124]
test eax, eax
jne 0x4dc790
test edi, edi
je 0x4dc8e3
push edi
call fcn.004fedfc
add esp, 4
mov eax, dword [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
push ebx
call fcn.004fedfc
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x114]
add esp, 4
pop esi
xor ecx, ebp
pop ebx
call fcn.004fe1f5
mov esp, ebp
pop ebp
ret