Function at 0x405560
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], str.sqXXXXXX
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov eax, dword [ebp - 0xc]
push eax
push 0x40bfe0
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x40bfe0
call dword [sym.imp.MSVCR71.dll__wmktemp]
add esp, 4
cmp dword [0x40b960], 0
je 0x4055c6
push 0x40b4c0
push 0x40bfe0
lea ecx, [ebp - 0x10]
push ecx
call fcn.00406cb0
add esp, 0xc
jmp 0x4055dc
push 0x40b4c8
push 0x40bfe0
lea edx, [ebp - 0x10]
push edx
call fcn.00406cb0
add esp, 0xc
cmp dword [ebp - 0x10], 0
jne 0x405614
push 0x100
push 0x40bde0
push 0x1f
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
push 0x40bfe0
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
jmp 0x4057d5
mov eax, dword [0x40c908]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x405647
push 0xc36
push 0x40b4d0
push str.NULL___mbcsBuffer
call dword [sym.imp.MSVCR71.dll__assert]
add esp, 0xc
mov eax, dword [0x40c908]
mov ecx, dword [eax + 4]
and ecx, 0x80000001
jns 0x40565c
dec ecx
or ecx, 0xfffffffe
inc ecx
test ecx, ecx
je 0x405678
push 0xc37
push 0x40b4fc
push str.pCmd__cbUsed_2__0
call dword [sym.imp.MSVCR71.dll__assert]
add esp, 0xc
push 0
push 0
mov eax, dword [0x40c908]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [0x40c908]
mov ecx, dword [eax + 4]
shr ecx, 1
push ecx
mov edx, dword [0x40c908]
add edx, 0xc
push edx
push 0
push 1
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
push eax
push 1
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.MSVCR71.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCR71.dll_fclose]
add esp, 4
mov edx, dword [0x40b9bc]
push edx
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
mov esi, eax
push 0x40bfe0
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 4
add esi, eax
lea eax, [esi + esi + 0xa]
push eax
call dword [sym.imp.MSVCR71.dll_malloc]
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x405734
push 0xc4a
push 0x40b528
push str.NULL___sname
call dword [sym.imp.MSVCR71.dll__assert]
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x405749
push 0x20
call fcn.004065d0
add esp, 4
jmp 0x4057d5
mov edx, dword [0x40b9bc]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCR71.dll_wcscpy]
add esp, 8
push 0x40b550
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
push 0x40bfe0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
mov eax, dword [ebp - 4]
push eax
call fcn.004069c0
add esp, 4
cmp eax, 0xffffffff
jne 0x4057c1
push 0x100
push 0x40bde0
push 0x21
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call fcn.00406630
mov ecx, dword [0x40b9bc]
push ecx
push 0x40bde0
call dword [sym.imp.MSVCR71.dll_wprintf]
add esp, 8
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.MSVCR71.dll_free]
add esp, 4
mov dword [ebp - 4], 0
pop esi
mov esp, ebp
pop ebp
ret