Function at 0x414099
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 0x4140cb
cmp dword [edi + 8], edx
je 0x4140cb
cmp dword [edi + 0xc], edx
je 0x4140cb
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 0x414109
test eax, eax
jne 0x414109
cmp dword [edi + 4], esi
je 0x4141c2
push edx
push 0x80
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 0x414107
and dword [edi], esi
jmp 0x4141c2
xor edx, edx
test ecx, ecx
je 0x4141c2
cmp dword [edi + 8], edx
je 0x4141c2
test byte [edi + 0x2c], 1
mov dword [esp + 0x1c], 0x440cfc
jne 0x414130
mov dword [esp + 0x1c], 0x441248
cmp dword [edi + 0x18], 0xfde9
jne 0x41413e
push 5
pop ebx
jmp 0x414140
mov ebx, edx
push ebp
mov ebp, dword [edi + 0x1c]
test ebp, ebp
je 0x41419f
cmp dword [ebp + 8], 1
push dword [ebp + 0xc]
jne 0x41416e
call fcn.00415a90
add ebx, 4
add ebx, eax
test byte [edi + 0x2c], 2
pop ecx
je 0x414196
push 0x441260
call fcn.00415a90
jmp 0x414193
cmp dword [ebp + 8], 2
jne 0x41417e
call fcn.00415a90
add ebx, 4
jmp 0x414193
call fcn.00415a90
push dword [ebp + 8]
mov esi, eax
call fcn.00415a90
add eax, esi
add ebx, 5
pop ecx
pop ecx
add ebx, eax
mov ebp, dword [ebp]
test ebp, ebp
jne 0x414148
xor edx, edx
test ebx, ebx
jne 0x4141cd
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 [0x44f914]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x4141b6
cmp dword [edi + 0x18], 0xfde9
mov esi, ebx
jne 0x41421b
test byte [edi + 0x2c], 4
jne 0x41421b
push 0x4406f0
push ebx
call fcn.00415990
push 0x441260
push ebx
call fcn.004159a0
push ebx
call fcn.00415a90
add esp, 0x14
lea esi, [ebx + eax]
mov ebp, dword [edi + 0x1c]
test ebp, ebp
je 0x4142cd
mov ebx, dword [esp + 0x20]
cmp dword [ebp + 8], 1
jne 0x414276
test byte [edi + 0x2c], 2
je 0x414253
cmp dword [esp + 0x10], 0
jne 0x414253
push 0x441260
push esi
call fcn.00415990
push esi
call fcn.00415a90
add esp, 0xc
add esi, eax
push 0x440c04
push esi
call fcn.00415990
push dword [ebp + 0xc]
push esi
call fcn.004159a0
add esp, 0x10
mov eax, 0x440c00
and dword [esp + 0x10], 0
jmp 0x4142a1
cmp dword [ebp + 8], 2
jne 0x41428b
push 0x44124c
push esi
call fcn.00415990
pop ecx
pop ecx
jmp 0x41429e
push dword [ebp + 8]
push esi
call fcn.00415990
push ebx
push esi
call fcn.004159a0
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
push esi
call fcn.004159a0
push 0x441260
push esi
call fcn.004159a0
push esi
call fcn.00415a90
mov ebp, dword [ebp]
add esp, 0x14
add esi, eax
test ebp, ebp
jne 0x41422a
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 [0x44f914]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4141b8