Function at 0x4412a3
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [esp + 0x1c]
xor ebx, ebx
xor edx, edx
inc ebx
mov esi, edx
mov dword [esp + 0xc], ebx
mov eax, dword [edi]
test eax, eax
je 0x4412d5
cmp dword [edi + 8], edx
je 0x4412d5
cmp dword [edi + 0xc], edx
je 0x4412d5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov dword [edi], edx
mov eax, edx
mov ecx, eax
cmp dword [edi + 8], edx
je 0x441313
test eax, eax
jne 0x441313
cmp dword [edi + 4], esi
je 0x4413ca
push edx
push pe_nt_image_headers32
push 2
push edx
push ebx
push 0xc0000000
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [edi], ecx
cmp ecx, 0xffffffff
jne 0x441311
and dword [edi], esi
jmp 0x4413ca
xor edx, edx
test ecx, ecx
je 0x4413ca
cmp dword [edi + 8], edx
je 0x4413ca
test byte [edi + 0x2c], 1
mov eax, 0x5bbb08
mov ecx, 0x5bae40
cmovne eax, ecx
push ebp
mov ebp, dword [edi + 0x1c]
mov dword [esp + 0x20], eax
xor eax, eax
cmp dword [edi + 0x18], 0xfde9
push 5
pop ebx
cmovne ebx, eax
test ebp, ebp
je 0x4413a7
cmp dword [ebp + 8], 1
push dword [ebp + 0xc]
jne 0x441376
call fcn.0058a810
add ebx, 4
add ebx, eax
test byte [edi + 0x2c], 2
pop ecx
je 0x44139e
push 0x5bbb0c
call fcn.0058a810
jmp 0x44139b
cmp dword [ebp + 8], 2
jne 0x441386
call fcn.0058a810
add ebx, 4
jmp 0x44139b
call fcn.0058a810
push dword [ebp + 8]
mov esi, eax
call fcn.0058a810
add eax, esi
add ebx, 5
pop ecx
pop ecx
add ebx, eax
mov ebp, dword [ebp]
test ebp, ebp
jne 0x441350
xor edx, edx
test ebx, ebx
jne 0x4413d5
push edx
push edx
push edx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor ebp, ebp
xor esi, esi
mov dword [edi + 8], ebp
mov dword [edi + 0xc], ebp
inc esi
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0xc
ret 4
lea eax, [ebx + 1]
push eax
push edx
push dword [0x871534]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x4413be
cmp dword [edi + 0x18], 0xfde9
mov esi, ebx
jne 0x441423
test byte [edi + 0x2c], 4
jne 0x441423
push 0x5bbaf8
push ebx
call fcn.0058a710
push 0x5bbb0c
push ebx
call fcn.0058a720
push ebx
call fcn.0058a810
add esp, 0x14
lea esi, [ebx + eax]
mov ebp, dword [edi + 0x1c]
test ebp, ebp
je 0x4414d2
mov ebx, dword [esp + 0x10]
cmp dword [ebp + 8], 1
jne 0x441478
test byte [edi + 0x2c], 2
je 0x441458
test ebx, ebx
jne 0x441458
push 0x5bbb0c
push esi
call fcn.0058a710
push esi
call fcn.0058a810
add esp, 0xc
add esi, eax
push 0x5bbb10
push esi
call fcn.0058a710
push dword [ebp + 0xc]
push esi
call fcn.0058a720
add esp, 0x10
mov eax, 0x5bbb14
xor ebx, ebx
jmp 0x4414a6
cmp dword [ebp + 8], 2
jne 0x44148d
push 0x5bbb18
push esi
call fcn.0058a710
pop ecx
pop ecx
jmp 0x4414a3
push dword [ebp + 8]
push esi
call fcn.0058a710
push dword [esp + 0x28]
push esi
call fcn.0058a720
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
push esi
call fcn.0058a720
push 0x5bbb0c
push esi
call fcn.0058a720
push esi
call fcn.0058a810
mov ebp, dword [ebp]
add esp, 0x14
add esi, eax
test ebp, ebp
jne 0x441432
mov ebx, dword [esp + 0x14]
xor ebp, ebp
push ebp
push ebp
push ebp
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
lea eax, [esp + 0x1c]
sub esi, ebx
push eax
push esi
push ebx
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
push ebp
push dword [0x871534]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4413c0