Function at 0x4056b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], esi
mov eax, dword [0x42a3f4]
mov dword [ebp - 0x14], 0
test eax, eax
jne 0x405880
mov eax, dword [0x42af60]
test eax, eax
jne 0x405880
mov esi, dword [0x42a238]
test esi, esi
jne 0x405880
test edi, edi
je 0x405703
mov ebx, dword [0x42b020]
test ebx, ebx
jne 0x405880
mov esi, dword [0x42a258]
mov eax, dword [0x42a25c]
lea eax, [esi + eax*4]
mov dword [ebp - 0x10], eax
cmp esi, eax
jae 0x40582c
lea esi, [esi]
mov ebx, dword [esi]
test ebx, ebx
je 0x405820
cmp ebx, dword [0x423960]
je 0x405820
movzx edx, byte [ebx + 0x51]
test dl, 4
je 0x405820
movzx eax, word [ebx + 0x50]
and eax, 0x1004
cmp ax, 4
je 0x405820
test dl, 9
jne 0x405820
cmp word [ebx + 0x4c], 0xffff
je 0x405820
mov dword [ebp - 0x18], 0
mov ecx, dword [0x42b020]
test ecx, ecx
je 0x40588d
test dl, 0x10
jne 0x405820
test edi, edi
jne 0x4058d8
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x4057a4
test byte [0x42a408], 1
jne 0x4058f8
mov eax, dword [0x42afa0]
test eax, eax
jne 0x405800
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x405919
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [eax + 0x24]
dec edx
mov dword [eax + 0x24], edx
test edx, edx
js 0x40594f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [eax + 0x20]
mov byte [edx], 0x20
inc dword [eax + 0x20]
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 4], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_fputs
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call fcn.00422040
mov eax, dword [ebp - 0x18]
test eax, eax
jns 0x405820
mov eax, dword [ebx]
mov dword [esp], str.unlink:
mov dword [esp + 4], eax
call fcn.00411c10
lea esi, [esi]
add esi, 4
cmp esi, dword [ebp - 0x10]
jb 0x405720
mov ecx, dword [ebp - 0x14]
test ecx, ecx
setne al
xor edx, edx
test edi, edi
sete dl
test eax, edx
je 0x405880
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [eax + 0x24]
dec edx
mov dword [eax + 0x24], edx
test edx, edx
js 0x4058be
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [eax + 0x20]
mov byte [edx], 0xa
inc dword [eax + 0x20]
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
add eax, 0x20
mov edi, dword [ebp - 4]
mov dword [ebp + 8], eax
mov esp, ebp
pop ebp
jmp fcn.00422040
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll__unlink
mov dword [ebp - 0x18], eax
test eax, eax
js 0x4058a7
movzx edx, byte [ebx + 0x51]
jmp 0x40577f
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x405820
movzx edx, byte [ebx + 0x51]
jmp 0x40577f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0xa
add eax, 0x20
mov dword [esp + 4], eax
call sub.msvcrt.dll__flsbuf
jmp 0x40585d
mov eax, dword [ebx]
mov edx, str._Deleting_intermediate_file___s
mov dword [esp + 4], edx
mov dword [esp], 0
mov dword [esp + 8], eax
call fcn.00411a10
jmp 0x405800
mov dword [esp], str.Removing_intermediate_files...
call sub.msvcrt.dll_puts
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call fcn.00422040
jmp 0x4057a4
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x4253e3
add eax, 0x20
mov dword [esp + 0xc], eax
mov eax, 3
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call sub.msvcrt.dll_fwrite
mov dword [ebp - 0x14], 1
jmp 0x4057da
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp], 0x20
add eax, 0x20
mov dword [esp + 4], eax
call sub.msvcrt.dll__flsbuf
jmp 0x4057da