Function at 0x401ce0
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x419361
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x20074
call fcn.00412010
mov eax, dword [0x423080]
xor eax, esp
mov dword [esp + 0x20070], eax
push ebx
push esi
push edi
mov eax, dword [0x423080]
xor eax, esp
push eax
lea eax, [esp + 0x20088]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00401bb0
add esp, 4
test eax, eax
jne 0x401d3f
mov eax, 1
jmp 0x401dcf
lea ecx, [ebp + 8]
call fcn.00401000
push eax
lea ecx, [esp + 0x2c]
push str._ls.tmp
push ecx
call fcn.00401410
add esp, 0xc
xor ebx, ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x20090], ebx
call fcn.004012e0
mov byte [esp + 0x20090], 1
mov eax, dword [esp + 0x14]
mov edx, dword [ebp + 8]
mov dword [esp + 0x1c], edx
cmp eax, ebx
je 0x401d8a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], ebx
call fcn.00401000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
jne 0x401df3
mov dword [esp + 0x14], ebx
lea ecx, [esp + 0x14]
call fcn.00401300
lea ecx, [esp + 0x28]
call fcn.004010a0
xor eax, eax
mov ecx, dword [esp + 0x20088]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20070]
xor ecx, esp
call fcn.0040839e
mov esp, ebp
pop ebp
ret
cmp eax, ebx
je 0x401dbb
lea ecx, [esp + 0x1c]
push ecx
push eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x20]
cmp eax, ebx
jg 0x401dbb
mov ecx, dword [esp + 0x1c]
jl 0x401e21
cmp ecx, 0x7fffffff
ja 0x401dbb
cmp eax, ebx
jl 0x401dbb
jg 0x401e2c
cmp ecx, 0x14
jb 0x401dbb
push ebx
push 0x14
lea eax, [esp + 0x1c]
call fcn.00402540
lea ecx, [esp + 0x18]
call fcn.004012e0
mov byte [esp + 0x20090], 2
mov edx, dword [esp + 0x28]
push edx
lea esi, [esp + 0x1c]
call fcn.00402340
test eax, eax
jne 0x401e67
mov ecx, esi
call fcn.00401300
jmp 0x401dbb
lea eax, [esp + 0x34]
push eax
xor esi, esi
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
call fcn.004160b0
add esp, 4
test eax, eax
je 0x401f53
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x401f4e
push ebx
lea ecx, [esp + 0x20]
push ecx
push 0x10000
lea edx, [esp + 0x88]
push edx
push eax
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401f4e
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x401f4e
push eax
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00416420
add esp, 0xc
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x10080]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esp + 0x30], 0x10000
call fcn.00416370
mov ecx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [esp + 0x30]
add esp, 0xc
mov esi, eax
cmp ecx, ebx
je 0x401f46
cmp eax, ebx
je 0x401f46
push ebx
lea edx, [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x10088]
push eax
push ecx
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401f46
cmp dword [esp + 0x1c], esi
jb 0x401f46
cmp dword [esp + 0x24], 0x10000
je 0x401ee2
cmp edi, ebx
je 0x401e8e
mov esi, 1
lea ecx, [esp + 0x34]
push ecx
call fcn.00416080
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, ebx
je 0x401f6f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], ebx
cmp eax, ebx
je 0x401f82
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], ebx
cmp esi, ebx
je 0x401fa9
mov edx, dword [ebp + 8]
push edx
call fcn.00401990
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x2c]
add esp, 4
push eax
push ecx
call fcn.004019c0
add esp, 8
jmp 0x401fb6
mov edx, dword [esp + 0x28]
push edx
call fcn.00401990
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00401300
lea ecx, [esp + 0x14]
call fcn.00401300
lea ecx, [esp + 0x28]
call fcn.004010a0
mov eax, esi
jmp 0x401dcf