Function at 0x42c160
Capabilities:
Get file size
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x44fd38
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x464628]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x464628]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov ebp, ecx
mov ecx, dword [esp + 0x5c]
mov esi, dword [esp + 0x50]
mov eax, dword [esp + 0x58]
mov dword [esp + 0x18], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x42c1b6
mov dword [ecx], 0
mov edi, dword [esp + 0x54]
mov dword [eax], 0
mov ecx, 0x100000
mov dword [esp + 0x30], 0
push 0
cmp edi, ecx
lea eax, [esp + 0x34]
push eax
mov ebx, edi
cmova ebx, ecx
push ebx
push esi
push dword [ebp]
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, 0x7fffbffb
add eax, 0x80004005
cmp dword [ebp + 0x1c], 0
je 0x42c3d8
test eax, eax
je 0x42c3d8
mov ecx, dword [esp + 0x30]
mov edi, edi
cmp ecx, ebx
jae 0x42c3aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [esp + 0x38], 0
lea eax, [esp + 0x38]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x42c25a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x42c25a
xorps xmm0, xmm0
movlpd qword [esp + 0x1c], xmm0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
jmp 0x42c265
mov eax, dword [esp + 0x38]
xor ecx, ecx
add ecx, esi
adc eax, 0
push 0
push edi
push eax
push ecx
sub esp, 0x18
lea ebx, [ebp + 4]
mov esi, esp
mov dword [esp + 0x44], esp
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
mov eax, 0xffffffff
mov edi, dword [ebx + 0x10]
cmp edi, 0xffffffff
cmova edi, eax
cmp esi, ebx
jne 0x42c2d4
cmp dword [esi + 0x10], edi
jb 0x42c3de
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], edi
jb 0x42c2b1
mov eax, dword [esi]
jmp 0x42c2b3
mov eax, esi
xor ecx, ecx
mov word [eax + edi*2], cx
cmp dword [esi + 0x10], ecx
ja 0x42c34b
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], ecx
jb 0x42c2cd
mov esi, dword [esi]
xor eax, eax
mov word [esi], ax
jmp 0x42c34b
cmp edi, 0x7ffffffe
ja 0x42c3e8
mov eax, dword [esi + 0x14]
cmp eax, edi
jae 0x42c2f4
push dword [esi + 0x10]
mov ecx, esi
push edi
call fcn.00403c7c
jmp 0x42c30b
test edi, edi
jne 0x42c30d
mov dword [esi + 0x10], edi
cmp eax, 8
jb 0x42c304
mov eax, dword [esi]
jmp 0x42c306
mov eax, esi
xor ecx, ecx
mov word [eax], cx
test edi, edi
setne al
test al, al
je 0x42c34b
cmp dword [ebx + 0x14], 8
jb 0x42c31c
mov ebx, dword [ebx]
cmp dword [esi + 0x14], 8
jb 0x42c326
mov ecx, dword [esi]
jmp 0x42c328
mov ecx, esi
test edi, edi
je 0x42c33a
lea eax, [edi + edi]
push eax
push ebx
push ecx
call fcn.00437440
add esp, 0xc
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], edi
jb 0x42c345
mov esi, dword [esi]
xor eax, eax
mov word [esi + edi*2], ax
mov dword [esp + 0x70], 0
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ecx]
mov dword [esp + 0x70], 0xffffffff
call dword [eax + 0x18]
mov esi, dword [esp + 0x18]
test eax, eax
jne 0x42c3d2
mov ebx, dword [esp + 0x24]
push eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x38]
push ebx
add eax, esi
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x30]
neg eax
sbb eax, eax
add ecx, dword [esp + 0x34]
and eax, 0x7fffbffb
mov dword [esp + 0x30], ecx
add eax, 0x80004005
jne 0x42c210
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x2c]
add dword [edx], ecx
test eax, eax
jne 0x42c3f2
test ecx, ecx
je 0x42c3ce
add esi, ecx
sub edi, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x54], edi
jne 0x42c1c0
mov al, 1
jmp 0x42c3fe
mov ecx, dword [esp + 0x30]
jmp 0x42c3aa
mov ecx, dword [esp + 0x30]
jmp 0x42c3ae
push str.invalid_string_position
call fcn.0043479b
push str.string_too_long
call fcn.0043476d
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x42c3fc
mov dword [ecx], eax
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28]
xor ecx, esp
call fcn.00437430
add esp, 0x38
ret 0x10