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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47bca0
push 0x44e7f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push ebx
push esi
push edi
or edi, 0xffffffff
mov dword [ebp - 0x3c], edi
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
push ebx
push 0x80
push 3
push ebx
push 3
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp esi, edi
je 0x407739
push ebx
push ebx
push 0x48
push esi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call edi
cmp eax, 0x48
jne 0x4075b5
push ebx
lea ecx, [ebp - 0x2c]
push ecx
push 4
lea edx, [ebp - 0x20]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x20], ebx
jbe 0x407739
push ebx
push ebx
push 0x50
push esi
call edi
cmp eax, 0x50
jne 0x407739
mov eax, dword [ebp - 0x20]
shl eax, 4
push eax
call fcn.0044ea51
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x30], ebx
cmp ebx, dword [ebp - 0x20]
jae 0x407620
mov edi, ebx
shl edi, 4
add edi, dword [ebp - 0x24]
mov dword [ebp - 0x48], edi
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 8
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [edi + 8], 0
push 0
lea edx, [ebp - 0x2c]
push edx
push 4
add edi, 0xc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
inc ebx
jmp 0x4075e3
xor edi, edi
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x30], edi
cmp edi, dword [ebp - 0x20]
jae 0x40764e
mov eax, edi
shl eax, 4
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x4c], eax
push 8
push eax
push ebx
call fcn.00455b4d
add esp, 0xc
test eax, eax
jne 0x40764b
mov dword [ebp - 0x28], edi
inc edi
jmp 0x407625
cmp dword [ebp - 0x28], 0xffffffff
je 0x407739
push 0
push 0
push 0x48
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x48
jne 0x407739
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
dec eax
mov dword [ebp - 0x38], eax
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 4
lea edx, [ebp - 0x38]
push edx
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
call ebx
push 0
push 0
push 0x50
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x50
jne 0x407739
xor edi, edi
mov dword [ebp - 0x34], edi
cmp edi, dword [ebp - 0x38]
jae 0x40770d
cmp edi, dword [ebp - 0x28]
jae 0x4076e2
shl edi, 4
add edi, dword [ebp - 0x24]
mov dword [ebp - 0x50], edi
push 0
lea eax, [ebp - 0x1c]
push eax
push 8
push edi
push esi
call ebx
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 4
add edi, 0xc
push edi
push esi
call ebx
mov edi, dword [ebp - 0x34]
cmp edi, dword [ebp - 0x28]
jb 0x40770a
inc edi
shl edi, 4
add edi, dword [ebp - 0x24]
mov dword [ebp - 0x54], edi
push 0
lea edx, [ebp - 0x1c]
push edx
push 8
push edi
push esi
call ebx
push 0
lea eax, [ebp - 0x1c]
push eax
push 4
add edi, 0xc
push edi
push esi
call ebx
mov edi, dword [ebp - 0x34]
inc edi
jmp 0x4076a9
mov byte [ebp - 0x60], 0
xor ecx, ecx
mov dword [ebp - 0x5f], ecx
mov dword [ebp - 0x5b], ecx
mov dword [ebp - 0x40], ecx
push ecx
lea edx, [ebp - 0x1c]
push edx
push 8
lea eax, [ebp - 0x60]
push eax
push esi
call ebx
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 4
lea edx, [ebp - 0x40]
push edx
push esi
call ebx
mov dword [ebp - 4], 0xffffffff
call fcn.0040775b
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8