Function at 0x414170
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov ecx, dword [0x44a1e4]
mov ebx, dword [esp + 0x80]
test ecx, ecx
jle 0x414660
test ebx, ebx
je 0x41452e
cmp byte [ebx], 0x2d
je 0x414524
mov dword [esp + 4], 0x439d53
mov dword [esp], ebx
call sub.msvcrt.dll_fopen
test eax, eax
mov dword [esp + 0x1c], eax
je 0x414673
mov edx, dword [0x44a1e8]
xor ebp, ebp
test edx, edx
jg 0x41420f
jmp 0x41424d
lea ecx, [esp + 0x3c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call fcn.004312d0
test eax, eax
js 0x414260
movzx eax, word [esp + 0x42]
and ax, 0xf000
cmp ax, 0x4000
jne 0x414290
test byte [0x44a21c], 0x10
jne 0x414503
add ebp, 1
cmp dword [0x44a1e8], ebp
jle 0x41424d
mov eax, dword [0x434ec8]
mov dword [0x434ec8], 0
mov dword [esp + 0x18], eax
lea eax, [ebp*8]
mov dword [esp + 0x14], eax
mov eax, dword [0x44a1d4]
mov eax, dword [eax + ebp*8]
test eax, eax
jne 0x4141d0
mov eax, dword [esp + 0x18]
mov dword [0x434ec8], eax
add ebp, 1
cmp dword [0x44a1e8], ebp
jg 0x41420f
mov eax, 1
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x18], 5
jbe 0x414204
mov esi, dword [esp + 0x14]
mov eax, dword [0x44a1d4]
mov eax, dword [eax + esi]
mov dword [esp], str.Couldnt_open___s__n
mov dword [esp + 4], eax
call fcn.0041ab80
jmp 0x414204
mov eax, dword [0x44a1d4]
mov edx, dword [esp + 0x14]
mov dword [esp + 4], 0x439d9c
mov eax, dword [eax + edx]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov dword [esp + 0x20], eax
je 0x414260
mov edx, dword [esp + 0x14]
mov eax, dword [0x44a1d4]
mov dword [esp + 4], 1
mov eax, dword [eax + edx]
mov dword [esp], eax
call fcn.0041da50
lea eax, [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00416100
test eax, eax
je 0x4144e9
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x4144e9
mov eax, dword [0x44a1d4]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x2c], ebp
mov eax, dword [eax + ecx + 4]
mov esi, eax
jmp 0x41432b
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00423730
test eax, eax
jne 0x414363
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x4144e5
test esi, esi
mov edi, dword [ebx + 0x10]
jne 0x414310
mov eax, dword [0x44a1dc]
test eax, eax
jle 0x414363
xor ebp, ebp
jmp 0x41434b
add ebp, 1
cmp ebp, dword [0x44a1dc]
jge 0x414320
mov eax, dword [0x44a1d8]
mov eax, dword [eax + ebp*4]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.00423730
test eax, eax
je 0x414340
mov edi, dword [ebx + 0x1c]
mov eax, dword [0x44a1d4]
mov edx, dword [esp + 0x14]
mov ecx, edi
and ecx, 1
mov ebp, dword [eax + edx]
mov eax, dword [0x44a21c]
je 0x414382
test al, 4
je 0x414320
mov edx, edi
and edx, 4
je 0x41438d
test al, 2
je 0x414320
test al, 1
je 0x414455
test ecx, ecx
mov eax, 0x439d0e
mov ecx, str.h_dpamkfg
cmovne eax, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
test edi, 2
mov edx, 0x439d0e
mov eax, 0x439d10
cmove eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, dword [esp + 0x24]
mov ecx, 0x439d0e
mov eax, 0x439d12
test edx, edx
cmove eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], str._____
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
cmp dword [ebx + 8], 2
je 0x414555
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 9
mov dword [esp + 4], 1
mov dword [esp], str.________
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x44a21c]
mov edx, dword [ebx + 0x10]
test al, 8
mov eax, dword [0x44a218]
mov dword [esp + 0x24], edx
jne 0x41446e
and edi, 2
jne 0x414540
test eax, eax
je 0x4144b2
xor edi, edi
test ebp, ebp
je 0x4144b2
mov dword [esp + 0x28], ebx
mov ebx, ebp
mov ebp, edi
mov edi, eax
jmp 0x414498
add ebp, 1
add eax, 1
cmp ebp, edi
je 0x414650
test eax, eax
je 0x4144ac
mov ebx, eax
mov dword [esp + 4], 0x2f
mov dword [esp], ebx
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x414484
mov ebp, ebx
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x414632
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp + 4], str._s__s__n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x41432b
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x18]
mov dword [0x434ec8], eax
jmp 0x414242
mov edx, dword [esp + 0x14]
mov eax, dword [0x44a1d4]
xor ecx, ecx
mov eax, dword [eax + edx]
mov dword [esp], 0
xor edx, edx
call fcn.00413d20
jmp 0x414204
cmp byte [ebx + 1], 0
jne 0x41419d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp + 0x1c], eax
jmp 0x4141b9
test eax, eax
je 0x414632
mov dword [esp + 0x24], 0
jmp 0x414472
mov ecx, 0x439d0e
test edi, 0x100
mov eax, 0x439d14
cmove eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, 0x439d0e
test edi, 0x200
mov eax, 0x439d16
cmove eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov ecx, 0x439d0e
test edi, 0x400
mov eax, 0x439d18
cmove eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov edx, 0x439d0e
test edi, 0x800
mov eax, 0x439d1a
cmove eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
test edi, 0x1000
mov ecx, 0x439d0e
mov eax, 0x439d1c
cmove eax, ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], 4
mov dword [esp + 4], 1
mov dword [esp], 0x439da5
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [0x44a21c]
jmp 0x414455
mov eax, dword [esp + 0x1c]
mov dword [esp + 8], ebp
mov dword [esp + 4], 0x439dbc
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x414320
mov ebp, ebx
test eax, eax
mov ebx, dword [esp + 0x28]
cmovne ebp, eax
jmp 0x4144b2
mov dword [esp], str.Must_specify_at_least_one_file_or_pattern_to_list_n
call fcn.0041ac30
xor eax, eax
jmp 0x414252
mov dword [esp + 4], ebx
mov dword [esp], 0x439d58
call fcn.0041ac30
mov dword [esp], 0x439c7a
call fcn.0041ab00
xor eax, eax
jmp 0x414252