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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421ea8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x42a520]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x28], ebx
cmp ebx, esi
je 0x40ba65
cmp ebx, 0xffffffff
je 0x40ba65
push esi
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov ecx, eax
mov dword [ebp - 0x24], ecx
cmp ecx, esi
je 0x40ba65
cmp ecx, 0xffffffff
je 0x40ba65
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
xor eax, eax
lea edx, [ebp - 0x11]
push edx
push eax
lea eax, [ebp - 0x38]
push eax
mov byte [ebp - 4], 1
mov eax, ecx
mov byte [ebp - 0x11], 0
call fcn.00407750
mov esi, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
cmp esi, edi
je 0x40baa4
sub edi, esi
cmp edi, dword [ebp - 0x24]
jne 0x40baa4
test esi, esi
je 0x40ba65
push 0
lea ecx, [ebp - 0x1c]
push ecx
push edi
push esi
push ebx
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x40ba5d
mov edx, dword [ebp - 0x24]
cmp dword [ebp - 0x1c], edx
jne 0x40ba5d
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x38]
push 0x10
xor ebx, ebx
push eax
mov ecx, 0x42b59c
mov dword [ebp - 0x28], ebx
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea ecx, [ebp - 0x38]
push 0x19396
push ecx
mov ecx, 0x42b5b0
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea edx, [ebp - 0x38]
push 0x1bbb4
push edx
mov ecx, 0x444948
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea eax, [ebp - 0x38]
push 0x45
push eax
mov ecx, 0x460500
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea ecx, [ebp - 0x38]
push 0x21
push ecx
mov ecx, 0x42b33c
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea edx, [ebp - 0x38]
push 0x35
push edx
mov ecx, 0x460548
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea eax, [ebp - 0x38]
push 0x31
push eax
mov ecx, 0x42b3f4
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea ecx, [ebp - 0x38]
push 0x21
push ecx
mov ecx, 0x42b494
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea edx, [ebp - 0x38]
push 0x41
push edx
mov ecx, 0x460580
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea eax, [ebp - 0x38]
push 0x93
push eax
mov ecx, 0x4605d8
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea ecx, [ebp - 0x38]
push 0x49
push ecx
mov ecx, 0x460670
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea edx, [ebp - 0x38]
push 0x1d
push edx
mov ecx, 0x4606bc
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea eax, [ebp - 0x38]
push 0x4b
push eax
mov ecx, 0x4606e0
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea ecx, [ebp - 0x38]
push 0x17
push ecx
mov ecx, 0x42b584
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea edx, [ebp - 0x38]
push 0x59
push edx
mov ecx, 0x460730
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
lea eax, [ebp - 0x38]
push 0x23
push eax
mov ecx, 0x42b504
call fcn.0040b660
add esp, 8
test eax, eax
je 0x40ba5d
mov ecx, dword [ebp + 0xc]
push ebx
push ebx
push 4
push ebx
push ebx
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40ba5d
cmp eax, 0xffffffff
je 0x40ba5d
push ebx
lea edx, [ebp - 0x1c]
push edx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40ba4d
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x18], 1
cmp eax, dword [ebp - 0x1c]
je 0x40ba50
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp - 0x20], ebx
lea esi, [ebp - 0x38]
call fcn.00407640
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x40ba7c
cmp ebx, 0xffffffff
je 0x40ba7c
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40ba8f
cmp eax, 0xffffffff
je 0x40ba8f
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x40ba65
push esi
call fcn.004106bc
add esp, 4
jmp 0x40ba65