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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485d4d
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x499100]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0xffffffff
push 0
push 0
push 3
push 0
push 0
push 0x80000000
push dword [ebp + 0xc]
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x411978
mov dword [ebp - 0x14], esi
test esi, esi
je 0x411978
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4118ae
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
push ebx
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 3
call fcn.00411990
mov edi, dword [ebp - 0x60]
lea eax, [ebp - 0x20]
push 0
push eax
push ebx
push edi
push esi
mov dword [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4118c5
cmp dword [ebp - 0x20], ebx
jne 0x4118dc
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
push dword [ebp + 0x10]
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 6
call fcn.00411990
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x50]
sub ecx, edi
mov ebx, dword [ebp - 0x54]
sub eax, ebx
push ecx
push edi
push eax
push ebx
push dword [ebp + 8]
mov dword [ebp - 4], 5
call fcn.00424350
add esp, 0x14
cmp eax, dword [ebp + 0x10]
jne 0x4118f1
push eax
call fcn.00423ee0
add esp, 4
test eax, eax
jne 0x411906
test esi, esi
je 0x4117b3
cmp esi, 0xffffffff
je 0x4117ac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x14], 0
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
lea ecx, [ebp - 0x14]
call fcn.00410fe0
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x411937
cmp esi, 0xffffffff
je 0x411937
push 0
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 0x10]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x411920
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x30], eax
jne 0x411920
test ebx, ebx
je 0x41183e
mov ecx, dword [ebp - 0x4c]
mov eax, ebx
sub ecx, ebx
cmp ecx, 0x1000
jb 0x411834
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41191b
push ecx
push ebx
call fcn.0046a9b7
add esp, 8
test edi, edi
je 0x41186f
mov ecx, dword [ebp - 0x58]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x411865
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41191b
push ecx
push edi
call fcn.0046a9b7
add esp, 8
test esi, esi
je 0x41187f
cmp esi, 0xffffffff
je 0x41187f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push 0x496098
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0xffffffff
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0xfffffff7
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0xfffffff6
push eax
call fcn.0046c260
call fcn.0046e58f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push 0x496098
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x38]
push 0x496098
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0xffffffff
push eax
call fcn.0046c260
push 0x496098
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0xffffffff
push eax
call fcn.0046c260
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x44]
push 0x496098
push eax
call fcn.0046c260
int3