Function at 0x409350
Capabilities:
Write file on windows

Disassembly:
push edi
pop edi
push ebp
push esp
pop ebp
sub esp, 0x220
mov eax, dword [0x45ba3c]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00409300
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x409673
mov dword [ebp - 8], 0
cmp dword [ebp + 8], 0xfc
je 0x4093dc
cmp dword [ebp + 8], 0xff
je 0x4093dc
cmp dword [ebp + 8], 0x1e
je 0x4093dc
mov ecx, dword [ebp - 4]
push ecx
push 0
push 0
push 0
push 1
call fcn.0040ffe0
add esp, 0x14
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0
je 0x4093d5
cmp dword [ebp - 0x220], 1
je 0x4093cb
jmp 0x4093dc
int3
mov dword [ebp - 8], 1
cmp dword [ebp - 8], 0
jne 0x409673
push 3
call fcn.00414230
add esp, 4
cmp eax, 1
je 0x409414
push 3
call fcn.00414230
add esp, 4
or eax, eax
jne 0x40949b
cmp dword [0x45b4d0], 1
jne 0x40949b
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x409496
cmp dword [ebp - 0xc], 0xffffffff
je 0x409496
mov dword [ebp - 0x14], 0
jmp 0x40943d
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x1f4
jae 0x40946b
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
mov cl, byte [edx + ecx*2]
mov byte [ebp + eax - 0x210], cl
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
movzx ecx, word [eax + edx*2]
test ecx, ecx
jne 0x409469
jmp 0x40946b
jmp 0x409434
mov byte [ebp - 0x1d], 0
push 0
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x210]
push eax
call fcn.00408980
add esp, 4
push eax
lea ecx, [ebp - 0x210]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x409673
cmp dword [ebp + 8], 0xfc
je 0x409673
mov dword [ebp - 0x218], 0x45d34a
mov eax, dword [ebp - 0x218]
sub eax, 0x45d318
sar eax, 1
mov ecx, 0x314
sub ecx, eax
mov dword [ebp - 0x21c], ecx
mov edx, dword [ebp - 0x218]
mov dword [ebp - 0x214], edx
push 0
push 0x110
push str.f:dd_vctoolscrt_bld_self_x86crt_srccrt0msg.c
push str._NMSG_WRITE
push str.wcscpy_s_outmsg___sizeof_outmsg____sizeof_outmsg_0_____L_Runtime_Error__n_nProgram:___
push str.Runtime_Error__n_nProgram:
push 0x314
push 0x45d318
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
sub eax, eax
mov ecx, dword [ebp - 0x218]
mov word [ecx + 0x208], ax
push 0x104
mov edx, dword [ebp - 0x218]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
or eax, eax
jne 0x40956f
push 0
push 0x114
push str.f:dd_vctoolscrt_bld_self_x86crt_srccrt0msg.c
push str._NMSG_WRITE
push str.wcscpy_s_progname__progname_size__L__program_name_unknown___
push 0x44f4e0
mov eax, dword [ebp - 0x21c]
push eax
mov ecx, dword [ebp - 0x218]
push ecx
call fcn.00414d50
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
mov edx, dword [ebp - 0x214]
push edx
call fcn.00414d20
add esp, 4
add eax, 1
cmp eax, 0x3c
jbe 0x4095f1
mov eax, dword [ebp - 0x218]
push eax
call fcn.00414d20
add esp, 4
mov ecx, dword [ebp - 0x214]
lea edx, [ecx + eax*2 - 0x76]
mov dword [ebp - 0x214], edx
push 0
push 0x11a
push str.f:dd_vctoolscrt_bld_self_x86crt_srccrt0msg.c
push str._NMSG_WRITE
push str.wcsncpy_s_pch__progname_size____pch___progname___L_...___3_
push 3
push 0x44f460
mov eax, dword [ebp - 0x214]
sub eax, dword [ebp - 0x218]
sar eax, 1
mov ecx, dword [ebp - 0x21c]
sub ecx, eax
push ecx
mov edx, dword [ebp - 0x214]
push edx
call fcn.00414910
add esp, 0x10
push eax
call fcn.00408050
add esp, 0x18
push 0
push 0x11d
push str.f:dd_vctoolscrt_bld_self_x86crt_srccrt0msg.c
push str._NMSG_WRITE
push str.wcscat_s_outmsg___sizeof_outmsg____sizeof_outmsg_0_____L__n_n__
push 0x44f3d8
push 0x314
push 0x45d318
call fcn.00414520
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
push 0
push 0x11e
push str.f:dd_vctoolscrt_bld_self_x86crt_srccrt0msg.c
push str._NMSG_WRITE
push str.wcscat_s_outmsg___sizeof_outmsg____sizeof_outmsg_0_____error_text_
mov eax, dword [ebp - 4]
push eax
push 0x314
push 0x45d318
call fcn.00414520
add esp, 0xc
push eax
call fcn.00408050
add esp, 0x18
push 0x12010
push 0x44f300
push 0x45d318
call fcn.00414300
add esp, 0xc
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00411b10
push ebp
pop esp
pop ebp
ret