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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov ebx, eax
mov esi, dword [ebp + 0x10]
xor eax, eax
push ebp
push 0x4c3b02
push dword fs:[eax]
mov dword fs:[eax], esp
cmp esi, 0xffffffff
je 0x4c37e0
mov eax, esi
cdq
mov dword [ebx + 0x420], eax
mov dword [ebx + 0x424], edx
mov eax, dword [0x56951c]
cdq
push edx
push eax
mov eax, dword [ebx + 0x420]
mov edx, dword [ebx + 0x424]
call fcn.00405400
mov dword [ebx + 0x420], eax
mov dword [ebx + 0x424], edx
call fcn.004aa4dc
test al, al
je 0x4c37c7
mov ecx, dword [ebx + 0x420]
and ecx, 0xffffffff
mov eax, dword [ebx + 0x424]
xor edx, edx
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetFilePointer
jmp 0x4c37e0
mov eax, dword [0x56951c]
test eax, eax
jns 0x4c37d5
add eax, 0x1ff
sar eax, 9
imul esi
mov dword [ebx + 0x3f4], eax
cmp byte [ebp + 0x14], 0
je 0x4c37ed
mov esi, 0x2710
jmp 0x4c37f0
mov esi, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov eax, ebx
call fcn.004c1bc0
test esi, esi
jle 0x4c3aab
mov dword [ebp - 0x38], esi
cmp byte [ebp + 0x14], 0
je 0x4c3817
mov eax, ebx
call fcn.004c3660
call fcn.004aa4dc
test al, al
je 0x4c3a03
mov al, byte [ebp - 1]
and al, byte [ebp + 8]
je 0x4c3850
mov edi, dword [0x56951c]
test edi, edi
jle 0x4c3850
mov esi, 1
mov eax, pe_nt_image_headers32
call fcn.00402f24
mov byte [ebx + esi + 0x567], al
inc esi
dec edi
jne 0x4c383b
cmp byte [ebp - 1], 0
je 0x4c3874
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x56951c]
push eax
lea eax, [ebx + 0x568]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_WriteFile_1
jmp 0x4c3890
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x56951c]
push eax
lea eax, [ebx + 0x568]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
cmp byte [ebp + 8], 0
je 0x4c39cf
mov ecx, dword [ebx + 0x420]
and ecx, 0xffffffff
mov eax, dword [ebx + 0x424]
xor edx, edx
mov dword [ebp - 0x18], eax
push 0
lea eax, [ebp - 0x18]
push eax
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x56951c]
push eax
lea eax, [ebx + 0x1000568]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_ReadFile
mov al, 1
mov edi, dword [ebp - 0x14]
test edi, edi
jle 0x4c3900
mov esi, 1
mov dl, byte [ebx + esi + 0x567]
cmp dl, byte [ebx + esi + 0x1000567]
je 0x4c38fc
xor eax, eax
jmp 0x4c3900
inc esi
dec edi
jne 0x4c38e8
mov byte [ebx + 0x43f], al
test al, al
jne 0x4c39cf
mov byte [ebx + 0x440], 1
mov byte [ebx + 0x43e], 0
xor edx, edx
mov eax, dword [ebx + 0x2fc]
mov ecx, dword [eax]
call dword [ecx + 0x64]
push 0
push 0x100000
mov eax, dword [ebx + 0x420]
mov edx, dword [ebx + 0x424]
call fcn.00405424
mov esi, eax
cmp esi, 0x2800
jle 0x4c3974
lea eax, [ebp - 0x34]
push eax
test esi, esi
jns 0x4c3959
add esi, 0x3ff
sar esi, 0xa
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x3c], 0
lea edx, [ebp - 0x40]
xor ecx, ecx
mov eax, 0x4c3b20
call fcn.00409cf8
jmp 0x4c398e
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x40], esi
mov byte [ebp - 0x3c], 0
lea edx, [ebp - 0x40]
xor ecx, ecx
mov eax, 0x4c3b48
call fcn.00409cf8
push dword [ebp - 0x34]
push 0x4c3b70
push 0x4c3b70
push 0x4c3b7c
lea eax, [ebp - 0x34]
mov edx, 4
call fcn.004048b0
push 0x10
push 0x4c3b8c
mov eax, dword [ebp - 0x34]
call fcn.004049f0
push eax
mov eax, ebx
call fcn.0045c328
push eax
call sub.user32.dll_MessageBoxA_1
jmp 0x4c3aab
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x3c], eax
fild qword [ebp - 0x40]
fadd qword [ebp - 0x30]
fstp qword [ebp - 0x30]
wait
mov eax, dword [ebp - 0x14]
xor edx, edx
add eax, dword [ebx + 0x420]
adc edx, dword [ebx + 0x424]
mov dword [ebx + 0x420], eax
mov dword [ebx + 0x424], edx
jmp 0x4c3a75
mov eax, dword [ebx + 0x3f4]
push eax
mov eax, dword [0x56951c]
test eax, eax
jns 0x4c3a18
add eax, 0x1ff
sar eax, 9
push eax
lea eax, [ebx + 0x568]
push eax
mov cl, byte [ebx + 0x430]
mov dl, byte [ebp - 1]
mov eax, ebx
call fcn.004c36ac
fild dword [0x56951c]
fadd qword [ebp - 0x30]
fstp qword [ebp - 0x30]
wait
mov eax, dword [0x56951c]
cdq
add eax, dword [ebx + 0x420]
adc edx, dword [ebx + 0x424]
mov dword [ebx + 0x420], eax
mov dword [ebx + 0x424], edx
mov eax, dword [0x56951c]
test eax, eax
jns 0x4c3a6c
add eax, 0x1ff
sar eax, 9
add dword [ebx + 0x3f4], eax
mov eax, dword [0x5698dc]
mov eax, dword [eax]
call fcn.00475568
cmp byte [ebx + 0x440], 0
jne 0x4c3aab
cmp byte [ebp + 0x14], 0
je 0x4c3aa2
mov eax, ebx
call fcn.004c1bd8
fcomp dword [0x4c3b94]
fnstsw ax
sahf
ja 0x4c3aab
dec dword [ebp - 0x38]
jne 0x4c380a
mov eax, ebx
call fcn.004c1bd8
fstp qword [ebp - 0x28]
wait
fld qword [ebp - 0x28]
fcomp dword [0x4c3b98]
fnstsw ax
sahf
jne 0x4c3ace
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
jmp 0x4c3aec
fld qword [ebp - 0x30]
fdiv qword [ebp - 0x28]
fmul dword [0x4c3b94]
call fcn.00402b60
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
fild qword [ebp - 0x40]
fstp qword [ebp - 0x10]
wait
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4c3b09
lea eax, [ebp - 0x34]
call fcn.00404530
ret