Function at 0x4d47b0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x20
add esp, 0xfffff004
push eax
dec eax
jne 0x4d47b9
mov eax, dword [ebp - 4]
add esp, 0xfffffea0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x20164], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov esi, ecx
lea edi, [ebp - 0x160]
mov ecx, 0x4c
rep movsd dword es:[edi], dword [esi]
mov esi, edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4d4a13
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x28], eax
test esi, esi
jne 0x4d4812
mov ebx, 1
jmp 0x4d49ed
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 8], 4
jne 0x4d4833
lea edx, [ebp - 4]
mov eax, dword [ebp - 0xc]
call fcn.004d4a38
jmp 0x4d483e
lea edx, [ebp - 4]
mov eax, dword [ebp - 0xc]
call fcn.004d5284
push dword [ebp - 4]
push 0x4d4a34
lea eax, [ebp - 0x20164]
lea edx, [ebp - 0x14c]
mov ecx, 0x82
call fcn.00406b20
push dword [ebp - 0x20164]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00406ed8
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 8]
call fcn.004069ac
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x24], eax
test esi, esi
jne 0x4d489d
mov ebx, 2
jmp 0x4d49ed
push 0
push 0
mov eax, dword [ebp + 0x14]
push eax
push esi
call sub.kernel32.dll_SetFilePointer
xor eax, eax
mov dword [ebp - 0x10], eax
mov ebx, 0x10000
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
sub eax, dword [ebp - 0x20]
sbb edx, dword [ebp - 0x1c]
cmp edx, dword [esp + 4]
jne 0x4d48d6
cmp eax, dword [esp]
pop edx
pop eax
jae 0x4d48e0
jmp 0x4d48da
pop edx
pop eax
jge 0x4d48e0
mov ebx, dword [ebp - 0x48]
sub ebx, dword [ebp - 0x20]
lea eax, [ebp - 0x20160]
xor ecx, ecx
mov edx, 0x20000
call fcn.004047ec
push 0
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x20160]
push eax
push esi
call sub.kernel32.dll_ReadFile
cmp eax, 1
sbb eax, eax
inc eax
test al, al
je 0x4d4915
cmp ebx, dword [ebp - 0x10]
je 0x4d4921
mov dword [ebp - 0x28], 3
jmp 0x4d49db
mov eax, ebx
xor edx, edx
add eax, dword [ebp - 0x20]
adc edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
cmp dword [ebp + 0x10], 0
jne 0x4d493f
cmp dword [ebp + 0xc], 0
jbe 0x4d4999
jmp 0x4d4941
jle 0x4d4999
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0
push 0x64
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
add eax, dword [ebp + 0x14]
adc edx, dword [ebp + 0x18]
call fcn.00407a90
call fcn.00407ab4
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
push 0
push 3
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
call fcn.00407b48
cmp edx, 0
jne 0x4d4999
cmp eax, 0
jne 0x4d4999
mov eax, dword [ebp - 0x30]
push eax
push 0
push 0x402
mov eax, dword [ebp - 0xc]
call fcn.0048b698
push eax
call sub.user32.dll_SendMessageW
test ebx, ebx
jbe 0x4d49cf
push 0
lea eax, [ebp - 0x14]
push eax
push ebx
lea eax, [ebp - 0x20160]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
test al, al
je 0x4d49c6
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x4d49cf
mov dword [ebp - 0x28], 4
jmp 0x4d49db
cmp ebx, 0x10000
je 0x4d48ab
cmp dword [ebp - 0x24], 0
je 0x4d49ea
mov eax, dword [ebp - 0x24]
push eax
call sub.kernel32.dll_CloseHandle_1
mov ebx, dword [ebp - 0x28]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d4a1a
lea eax, [ebp - 0x20164]
call fcn.00406910
lea eax, [ebp - 8]
mov edx, 2
call fcn.00406918
ret