Function at 0x4d39a0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0x10
add esp, 0xfffff004
push eax
dec eax
jne 0x4d39a9
mov eax, dword [ebp - 4]
add esp, 0xfffffe7c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10184], ebx
mov dword [ebp - 0x10188], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00406908
mov eax, dword [ebp - 8]
call fcn.00406908
xor eax, eax
push ebp
push 0x4d3dd5
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x44], eax
xor esi, esi
mov edx, dword [ebp - 4]
mov eax, dword [0x4d03c8]
call fcn.004d2abc
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov eax, dword [ebp - 8]
call fcn.004069ac
push eax
call sub.kernel32.dll_CreateFileW
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4d3a44
mov dword [ebp - 0x44], 1
jmp 0x4d3d8b
push 0
push 0
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.004069ac
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
cmp esi, 0xffffffff
jne 0x4d3a74
mov dword [ebp - 0x44], 2
jmp 0x4d3d8b
push 0
push ebx
call sub.kernel32.dll_GetFileSize
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
push 2
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointer
push 0
push 0x200
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call fcn.00407b48
cmp edx, 0
jne 0x4d3aae
cmp eax, 0
jbe 0x4d3af8
jmp 0x4d3ab0
jle 0x4d3af8
mov eax, 0x200
xor edx, edx
push edx
push eax
push 0
push 0x200
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call fcn.00407b48
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
jne 0x4d3ae8
cmp dword [ebp - 0x28], 0
jbe 0x4d3af8
jmp 0x4d3aea
jle 0x4d3af8
push 1
push 0
mov eax, dword [ebp - 0x28]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 4]
call fcn.0041355c
lea eax, [ebp - 0x180]
xor ecx, ecx
mov edx, 0x130
call fcn.004047ec
push 0x4d3df4
lea edx, [ebp - 0x10188]
mov eax, dword [ebp + 0xc]
call fcn.00412a84
push dword [ebp - 0x10188]
push 0x4d3df4
lea eax, [ebp - 0x10184]
mov edx, 3
call fcn.00406ed8
mov edx, dword [ebp - 0x10184]
lea eax, [ebp - 0x10]
mov ecx, 0
call fcn.00406b64
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x4d3b77
mov eax, edi
sub eax, 0xa
cmp word [eax], 1
je 0x4d3b77
lea eax, [ebp - 0x10]
xor ecx, ecx
mov edx, dword [ebp - 0x10]
call fcn.004062e4
mov edi, eax
lea eax, [ebp - 0x10]
call fcn.004064e8
mov edi, eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4d3ba0
mov edx, eax
sub edx, 0xa
cmp word [edx], 1
je 0x4d3ba0
lea eax, [ebp - 0x10]
xor ecx, ecx
mov edx, dword [ebp - 0x10]
call fcn.004062e4
test eax, eax
je 0x4d3ba9
sub eax, 4
mov eax, dword [eax]
lea edx, [ebp - 0x180]
mov ecx, eax
mov eax, edi
call fcn.0040438c
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x4d3bd7
mov eax, edi
sub eax, 0xa
cmp word [eax], 2
je 0x4d3bd7
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004062b4
mov edi, eax
lea eax, [ebp - 0xc]
call fcn.0040732c
mov edi, eax
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4d3bfe
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x4d3bfe
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.004062b4
test eax, eax
je 0x4d3c07
sub eax, 4
mov eax, dword [eax]
mov ecx, eax
add ecx, ecx
lea edx, [ebp - 0x16c]
mov eax, edi
call fcn.0040438c
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x64], eax
movzx eax, byte [ebp + 8]
mov byte [ebp - 0x58], al
mov dword [ebp - 0x28], 0xd0
mov dword [ebp - 0x24], 0
push 0
lea eax, [ebp - 0x40]
push eax
push 0x130
lea eax, [ebp - 0x180]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x24], 0
jne 0x4d3c5f
cmp dword [ebp - 0x28], 0
jbe 0x4d3c6f
jmp 0x4d3c61
jle 0x4d3c6f
push 1
push 0
mov eax, dword [ebp - 0x28]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
xor eax, eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x10180]
xor ecx, ecx
mov edx, 0x10000
call fcn.004047ec
push 0
lea eax, [ebp - 0x3c]
push eax
push 0x10000
lea eax, [ebp - 0x10180]
push eax
push esi
call sub.kernel32.dll_ReadFile
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4d3cc2
mov dword [ebp - 0x44], 3
jmp 0x4d3d8b
cmp dword [ebp - 0x40], 0
jbe 0x4d3cfd
push 0
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x10180]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
cmp eax, 1
sbb eax, eax
inc eax
test al, al
je 0x4d3cf1
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x3c]
je 0x4d3cfd
mov dword [ebp - 0x44], 4
jmp 0x4d3d8b
mov eax, dword [ebp - 0x3c]
xor edx, edx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
add eax, dword [ebp - 0x38]
adc edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x1c], 0
jne 0x4d3d28
cmp dword [ebp - 0x20], 0
jbe 0x4d3d7e
jmp 0x4d3d2a
jle 0x4d3d7e
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push 0
push 0x64
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
call fcn.00407a90
call fcn.00407ab4
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
push 0
push 3
mov eax, dword [ebp - 0x50]
mov edx, dword [ebp - 0x4c]
call fcn.00407b48
cmp edx, 0
jne 0x4d3d7e
cmp eax, 0
jne 0x4d3d7e
mov eax, dword [ebp - 0x50]
push eax
push 0
push 0x402
mov eax, dword [0x4e537c]
call fcn.0048b698
push eax
call sub.user32.dll_SendMessageW
cmp dword [ebp - 0x3c], 0x10000
je 0x4d3c7d
test esi, esi
je 0x4d3d95
push esi
call sub.kernel32.dll_CloseHandle_1
test ebx, ebx
je 0x4d3d9f
push ebx
call sub.kernel32.dll_CloseHandle_1
mov ebx, dword [ebp - 0x44]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d3ddc
lea eax, [ebp - 0x10188]
mov edx, 2
call fcn.00406918
lea eax, [ebp - 0x10]
call fcn.00406104
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00406918
ret