Function at 0x404332
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
cmp dword [ebp + 8], 0
je 0x40434d
mov eax, dword [ebp + 8]
mov dword [eax], 0
cmp dword [ebp - 0xc], 0
je 0x404360
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0
cmp dword [ebp - 0xc], 0
je 0x404372
cmp dword [ebp + 0x10], 0
je 0x404372
cmp dword [ebp + 0x14], 0
jns 0x40439d
cmp dword [ebp + 8], 0
je 0x404381
mov eax, dword [ebp + 8]
mov dword [eax], 0xfffffffe
cmp dword [ebp - 0xc], 0
je 0x40459b
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0xfffffffe
jmp 0x40459b
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 0x1390]
test al, al
jne 0x4043d6
cmp dword [ebp + 8], 0
je 0x4043ba
mov eax, dword [ebp + 8]
mov dword [eax], 0xffffffff
cmp dword [ebp - 0xc], 0
je 0x40459e
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0xffffffff
jmp 0x40459e
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
setne al
test al, al
je 0x404417
cmp dword [ebp + 8], 0
je 0x4043fb
mov eax, dword [ebp + 8]
mov dword [eax], 0xfffffffa
cmp dword [ebp - 0xc], 0
je 0x4045a1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0xfffffffa
jmp 0x4045a1
cmp dword [ebp + 0x14], 0
jne 0x404448
cmp dword [ebp + 8], 0
je 0x40442c
mov eax, dword [ebp + 8]
mov dword [eax], 0
cmp dword [ebp - 0xc], 0
je 0x4045a4
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0
jmp 0x4045a4
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x1398], edx
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 0x10]
mov dword [eax + 0x1394], edx
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13a8], 0x1388
mov eax, dword [ebp - 0xc]
lea edx, [eax + 4]
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13a4], edx
mov eax, dword [ebp - 0xc]
add eax, 0x1394
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.004021f1
sub esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 1
je 0x4044c9
cmp dword [ebp + 8], 0
je 0x4044ae
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
cmp dword [ebp - 0xc], 0
je 0x4045a7
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [eax + 0x13c4], edx
jmp 0x4045a7
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x13a8]
cmp eax, 0x1387
ja 0x404566
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0x13a8]
mov eax, 0x1388
sub eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
mov edx, dword [eax]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
call sub.msvcrt.dll_fwrite
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jne 0x404532
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x404539
mov eax, 1
jmp 0x40453e
mov eax, 0
test al, al
je 0x404566
cmp dword [ebp + 8], 0
je 0x404551
mov eax, dword [ebp + 8]
mov dword [eax], 0xfffffffa
cmp dword [ebp - 0xc], 0
je 0x4045aa
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0xfffffffa
jmp 0x4045aa
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1398]
test eax, eax
jne 0x404460
cmp dword [ebp + 8], 0
je 0x404586
mov eax, dword [ebp + 8]
mov dword [eax], 0
cmp dword [ebp - 0xc], 0
je 0x4045ad
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x13c4], 0
jmp 0x4045ad
nop
jmp 0x4045ae
nop
jmp 0x4045ae
nop
jmp 0x4045ae
nop
jmp 0x4045ae
nop
jmp 0x4045ae
nop
jmp 0x4045ae
nop
leave
ret 0x10