Function at 0x4042e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
or dword [esp + 0x1c], 0xffffffff
push ebx
push ebp
push esi
push edi
push ecx
push 4
push 3
push 0xc0000000
push dword [esp + 0x44]
mov ebp, ecx
mov dword [esp + 0x3c], 0x4679a8
lea ecx, [esp + 0x3c]
call fcn.00401442
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x2c]
test al, al
je 0x4044ce
cmp esi, 0xffffffff
je 0x4044ce
push 0
lea eax, [esp + 0x30]
xorps xmm0, xmm0
push eax
push 0
push esi
movlpd qword [esp + 0x38], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x40435c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4044c3
mov eax, dword [esp + 0x28]
or eax, dword [esp + 0x2c]
jne 0x4044c3
mov edx, dword [ebp + 0xc]
xorps xmm0, xmm0
mov eax, dword [ebp]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], eax
movlpd qword [esp + 0x10], xmm0
cmp esi, 0xffffffff
je 0x40440b
test eax, eax
je 0x40440b
test edx, edx
jne 0x404395
test ebx, ebx
je 0x40440b
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x10], eax
and dword [esp + 0x34], 0
test edx, edx
jb 0x4043bf
ja 0x4043b8
cmp ebx, 0xfffffff
jbe 0x4043bf
mov ecx, 0xfffffff
jmp 0x4043c1
mov ecx, ebx
add eax, dword [esp + 0x28]
lea edx, [esp + 0x34]
push 0
push edx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x1c]
test eax, eax
mov eax, dword [esp + 0x10]
je 0x404413
add eax, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
adc ecx, 0
mov dword [esp + 0x10], eax
sub ebx, dword [esp + 0x34]
mov dword [esp + 0x1c], ecx
sbb edx, 0
mov dword [esp + 0x20], edx
test edx, edx
ja 0x4043a5
jb 0x404413
test ebx, ebx
jne 0x4043a5
jmp 0x404413
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x4044c3
cmp ecx, dword [ebp + 0xc]
jne 0x4044c3
xor ebx, ebx
or ebp, 0xffffffff
xorps xmm0, xmm0
inc ebx
movlpd qword [esp + 0x20], xmm0
cmp esi, ebp
je 0x4044a9
push ebx
lea eax, [esp + 0x28]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
jne 0x404463
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40445f
mov edi, ebp
jmp 0x404467
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
push 0
lea eax, [esp + 0x30]
mov dword [esp + 0x2c], edi
push eax
push edi
push esi
mov dword [esp + 0x3c], ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
jne 0x40449d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x404499
or eax, 0xffffffff
or ecx, 0xffffffff
jmp 0x4044a1
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
cmp eax, edi
jne 0x4044b0
cmp ecx, ebp
jne 0x4044b0
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0xffffffff
je 0x4044d8
push esi
call edi
or esi, 0xffffffff
jmp 0x4044d0
cmp esi, 0xffffffff
je 0x4044ce
push esi
call edi
or esi, 0xffffffff
xor bl, bl
cmp esi, 0xffffffff
je 0x4044d8
push esi
call edi
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x20
ret 0xc