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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4339c0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x80
mov eax, dword [0x445008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x8c], edi
mov eax, ecx
mov dword [ebp - 0x74], eax
cmp dword [eax + 0x50], 0
je 0x416b64
cmp dword [eax + 0x68], 0
je 0x416b64
cmp edi, 0xffffffff
je 0x416b64
cmp dword [ebx + 8], 0
je 0x416b64
lea eax, [ebp - 0x58]
xorps xmm0, xmm0
push eax
push edi
movq qword [ebp - 0x58], xmm0
call dword [sym.imp.KERNEL32.DLL_GetFileSizeEx]
test eax, eax
je 0x416b64
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
push 0x100010
movq qword [ebp - 0x48], xmm0
movq qword [ebp - 0x50], xmm0
movups xmmword [ebp - 0x30], xmm0
call fcn.00402120
add esp, 4
mov dword [ebp - 0x20], 0x100000
mov esi, eax
mov dword [ebp - 0x1c], 0x10000f
mov dword [ebp - 0x30], esi
push 0x100000
push 0
push esi
call fcn.00423800
add esp, 0xc
mov byte [esi + 0x100000], 0
cmp dword [ebx + 8], 1
xorps xmm0, xmm0
movlpd qword [ebp - 0x80], xmm0
jne 0x4168c1
mov ecx, 0x100000
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x34], ecx
jmp 0x4168e2
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x88], edx
test edx, edx
jl 0x4169f4
jg 0x4168e2
test ecx, ecx
je 0x4169f4
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x7c], eax
push 1
lea eax, [ebp - 0x50]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x48], xmm0
push dword [ebp - 0x44]
push dword [ebp - 0x48]
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
test eax, eax
je 0x416b30
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 0x18]
push 0
push ecx
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push 0x100000
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
je 0x416b30
push 0
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x50]
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
test eax, eax
je 0x416b30
mov eax, dword [ebp - 0x74]
lea edx, [eax + 0x58]
mov dword [ebp - 4], 0
cmp dword [edx + 0x14], 0x10
jb 0x41696a
mov edx, dword [edx]
mov ecx, eax
call fcn.00414970
cmp dword [ebp - 0x1c], 0x10
lea esi, [ebp - 0x30]
push dword [ebp - 0x20]
cmovae esi, dword [ebp - 0x30]
lea edx, [ebp - 0x30]
setae cl
test cl, cl
mov ecx, dword [ebp - 0x74]
push esi
cmovne edx, dword [ebp - 0x30]
call fcn.00414990
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 0x18]
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push 0
push ecx
push dword [ebp - 0x20]
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x416b30
mov esi, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x84]
add esi, 0x100000
mov dword [ebp - 0x7c], esi
adc eax, 0
mov dword [ebp - 0x84], eax
cmp eax, dword [ebp - 0x88]
jl 0x4168f1
jg 0x4169f4
cmp esi, dword [ebp - 0x34]
jb 0x4168f1
xorps xmm0, xmm0
movq qword [ebp - 0x38], xmm0
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
movq qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
push 2
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x50]
push eax
push esi
mov dword [ebp - 0x44], esi
mov esi, dword [ebp - 0x8c]
push edi
push esi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x4c], ecx
call dword [sym.imp.KERNEL32.DLL_SetFilePointerEx]
test eax, eax
je 0x416bc2
mov edx, dword [ebp - 0x74]
lea ecx, [ebp - 0x70]
call fcn.00416380
mov ecx, dword [ebp - 0x60]
test ecx, ecx
je 0x416b92
cmp dword [ebp - 0x5c], 0x10
lea edx, [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.DLL_WriteFile]
lea eax, [ebp - 0x70]
cmovae eax, dword [ebp - 0x70]
push 0
push edx
push ecx
push eax
push esi
call edi
test eax, eax
je 0x416b92
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x60]
jne 0x416b92
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x38], eax
mov eax, dword [ebx + 8]
push 0
mov byte [ebp - 0x3c], al
lea eax, [ebp - 0x18]
push eax
push 0x10
lea eax, [ebp - 0x40]
mov byte [ebp - 0x3b], 0
push eax
push esi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x40], 0xd3b1d3ff
call edi
test eax, eax
je 0x416b92
cmp dword [ebp - 0x18], 0x10
jne 0x416b92
mov ecx, dword [ebp - 0x5c]
cmp ecx, 0x10
jb 0x416aee
mov edx, dword [ebp - 0x70]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416ae4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416bf1
push ecx
push edx
call fcn.004205b6
add esp, 8
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 0xf
mov byte [ebp - 0x70], 0
cmp ecx, 0x10
jb 0x416b8e
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416b84
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416bf1
jmp 0x416b84
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0x10
jb 0x416b64
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416b5a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416bec
push ecx
push edx
call fcn.004205b6
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00420573
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push ecx
push edx
call fcn.004205b6
add esp, 8
mov al, 1
jmp 0x416b66
mov ecx, dword [ebp - 0x5c]
cmp ecx, 0x10
jb 0x416bc2
mov edx, dword [ebp - 0x70]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416bb8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416bf6
push ecx
push edx
call fcn.004205b6
add esp, 8
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0x10
jb 0x416b64
mov edx, dword [ebp - 0x30]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x416b5a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x416b5a
call fcn.0042552f
call fcn.0042552f
call fcn.0042552f
int3