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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412bc0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push edi
mov eax, dword [0x41a018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [esi], 0xffffffff
je 0x40b573
lea ecx, [ebp - 0x14]
push ecx
mov ecx, str._Google.NTx86_
call fcn.00409010
push str.IsWow64Process
mov byte [ebp - 4], 1
push str.kernel32
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x41a650], eax
cmp eax, edi
je 0x40b45b
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x41a650]
cmp dword [ebp - 0x10], edi
je 0x40b475
push str._Google.NTamd64_
lea eax, [ebp - 0x14]
push eax
mov ebx, 0x10
call fcn.0040a910
xor edi, edi
mov ecx, dword [esi]
push edi
push ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea edx, [edi + 1]
push edx
mov dword [ebp - 0x24], edi
call fcn.004115db
mov ecx, dword [esi]
add esp, 4
push 0
mov ebx, eax
lea eax, [ebp - 0x1c]
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x1c]
mov byte [ebx + edx], 0
mov eax, dword [0x41a030]
mov edx, dword [eax + 0xc]
mov ecx, 0x41a030
call edx
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 2
test ebx, ebx
je 0x40b4f3
test ebx, 0xffff0000
jne 0x40b4f3
movzx eax, bx
push eax
call fcn.00407340
add esp, 4
test eax, eax
je 0x40b4fe
push eax
movzx eax, bx
lea edi, [ebp - 0x10]
call fcn.0040a870
jmp 0x40b4fb
lea eax, [ebp - 0x10]
call fcn.0040b770
mov edi, dword [ebp - 0x10]
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40b530
cmp dword [edi - 0xc], 0
jl 0x40b530
push eax
push edi
call dword [sym.imp.MSVCR100.dll_wcsstr]
add esp, 8
test eax, eax
je 0x40b530
sub eax, edi
sar eax, 1
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b5ae
mov edi, dword [ebp - 0x10]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b550
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b573
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b599
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str._Google.NTamd64_
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esi]
push 0
push 0
push 0
push ecx
add edi, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi]
push 0
lea edx, [ebp - 0x18]
push edx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00408f80
mov edx, dword [ebp + 8]
mov ecx, dword [edx - 0xc]
mov eax, dword [eax]
push 0
lea edx, [ebp - 0x18]
push edx
push ecx
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b61f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x24]
mov edx, dword [esi]
push 0
lea ecx, [ebp - 0x18]
push ecx
sub eax, edi
push eax
add edi, ebx
push edi
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov dword [esi], 0xffffffff
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b673
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b696
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b6bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4