Function at 0x43ffdc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
mov dword [ebp - 0x10], esi
mov esi, edx
mov dword [ebp - 0x18], ebx
mov ebx, eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ecx
cmp dword [esi], 3
je 0x440714
mov ecx, dword [ebx + 0x100]
cmp ecx, 0xfffffffc
je 0x4406bc
cmp ecx, 0xfffffffd
je 0x44003c
cmp ecx, 0xfffffffe
jne 0x440029
test byte [ebx + 0x171], 4
je 0x4400bf
jmp 0x440762
cmp ecx, 0xffffffff
jne 0x44005c
test byte [ebx + 0x171], 4
je 0x4400a3
jmp 0x440750
movzx eax, byte [ebx + 0x171]
test al, 4
je 0x4400db
test byte [ebx + 0x168], 1
jne 0x4400db
jne 0x4400bf
jne 0x4400a3
mov edx, dword [esi + 4]
test edx, edx
je 0x440251
mov eax, dword [esi + 8]
cmp eax, 0x100
lea ecx, [ebp - 0x222]
mov dword [ebp - 8], ecx
jl 0x44007f
mov eax, 0x100
push eax
push edx
push ecx
mov dword [ebp - 4], eax
call fcn.004c3ac0
add esp, 0xc
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x1c], 1
mov byte [edi + eax], 0
movsx edx, byte [edi]
jmp 0x44011b
push str.FOR_PRINT
call fcn.00479950
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x44040a
jmp 0x4400f5
push str.FOR_TYPE
call fcn.00479950
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x440430
jmp 0x4400f5
push str.FOR_ACCEPT
call fcn.00479950
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x440696
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x440115
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x440100
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
cmp edx, 0x20
jne 0x440131
test eax, eax
jle 0x44014b
inc edi
dec eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
cmp byte [edi], 0x20
je 0x440120
test eax, eax
jle 0x44014b
movsx edx, byte [eax + edi - 1]
cmp edx, 0x20
je 0x440143
test edx, edx
jne 0x440179
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x440135
jne 0x440179
test byte [ebx + 0x171], 4
je 0x440179
mov eax, ebx
lea edx, [ebp - 8]
lea ecx, [ebp - 4]
call fcn.00440780
test eax, eax
jne 0x44016c
mov edi, dword [ebp - 8]
jmp 0x440179
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x1c], 0
jne 0x440183
xor ecx, ecx
jmp 0x4401f4
mov eax, dword [ebp - 4]
push edi
push ebx
mov byte [edi + eax], 0
call fcn.00425070
add esp, 8
cmp eax, 0xffffffff
je 0x440472
cmp dword [0x516200], 0
jne 0x4401ab
cmp eax, 0xfffffffa
je 0x4401de
cmp eax, 1
je 0x4401de
test eax, eax
jne 0x4401be
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x4401e6
cmp eax, 2
jne 0x4401cd
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x4401e6
mov dword [ebp - 0x1c], 0
mov ecx, 1
mov edi, dword [ebp - 8]
jmp 0x4401f4
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
xor ecx, ecx
mov dword [ebx + 0xe4], eax
mov dword [ebp - 0x1c], ecx
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x4401f7
mov edx, dword [ebp + 0x14]
cmp dword [0x516200], 0
je 0x440222
cmp dword [ebp - 0x1c], 0
jne 0x440231
cmp dword [ebx + 0xe4], 0xffffffff
je 0x440456
jmp 0x440231
cmp dword [ebp - 0x1c], 0
jne 0x440231
cmp dword [ebx + 0xe4], 0xffffffff
je 0x440235
test ecx, ecx
je 0x44023d
mov dword [edx], 1
jmp 0x440242
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
xor eax, eax
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
push ecx
push str.FORT_d
lea eax, [ebp - 0x222]
push eax
call fcn.004792a0
lea eax, [ebp - 0x222]
push eax
call fcn.00479950
add esp, 0x10
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x4402a6
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x440294
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x44027f
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 1
jmp 0x44011b
mov eax, dword [ebx + 0x100]
add eax, 4
cmp eax, 0xa
ja case.0x4402b8.1
jmp dword [eax*4 + 0x4ea00c]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONOUT_
mov dword [ebp - 8], str.CONOUT_
jmp 0x440311
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONOUT_
mov dword [ebp - 8], str.CONOUT_
jmp 0x440311
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONIN_
mov dword [ebp - 8], str.CONIN_
test edi, edi
je 0x4403fe
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x440332
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x44031d
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 0
jmp 0x44011b
mov dword [ebp - 0x1c], 1
test byte [ebx + 0x171], 4
jne 0x4403e9
test byte [ebx + 0x169], 0x20
je 0x44039e
mov edi, dword [ebx + 0x60]
mov ecx, edi
mov dword [ebp - 8], edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x440380
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x44036b
dec eax
mov dword [ebp - 4], eax
cmp dword [esi], 0
je 0x440396
mov dword [esi], 0
movsx edx, byte [edi]
jmp 0x44011b
movsx edx, byte [edi]
jmp 0x44011b
push dword [ebx + 0x100]
push str.fort._d
lea eax, [ebp - 0x222]
push eax
call fcn.004792a0
add esp, 0xc
lea ecx, [ebp - 0x222]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4403d5
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4403c0
dec eax
mov dword [ebp - 4], eax
lea edi, [ebp - 0x222]
mov dword [ebp - 8], edi
movsx edx, byte [edi]
jmp 0x44011b
xor eax, eax
lea edi, [ebp - 0x222]
mov dword [ebp - 8], edi
mov byte [edi], al
mov dword [ebp - 4], eax
jmp 0x44014d
mov dword [ebp - 0x1c], 0
jmp 0x44034b
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONOUT_
mov dword [ebp - 8], str.CONOUT_
mov dword [ebp - 0x1c], 0
jmp 0x4400fc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONOUT_
mov dword [ebp - 8], str.CONOUT_
mov dword [ebp - 0x1c], 0
jmp 0x4400fc
test ecx, ecx
jne 0x440235
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0xe4], 0
mov dword [edx], eax
jmp 0x440242
mov eax, dword [esi + 0xc]
test byte [ebx + 0x171], 8
jne 0x440488
test eax, eax
je 0x44056b
jmp 0x440490
test eax, eax
je 0x440670
mov edi, dword [esi + 0x10]
cmp edi, 0xff
jg 0x44050e
push edi
push eax
lea edx, [ebp - 0x121]
push edx
call fcn.004c3ac0
add esp, 0xc
mov byte [ebp + edi - 0x121], 0
lea edx, [ebp - 0x121]
cmp byte [ebp - 0x121], 0x20
jne 0x4404ce
test edi, edi
jle 0x4404e9
inc edx
dec edi
cmp byte [edx], 0x20
je 0x4404c3
test edi, edi
jle 0x4404e9
movsx eax, byte [edi + edx - 1]
cmp eax, 0x20
je 0x4404e4
test eax, eax
jne 0x44059e
dec edi
test edi, edi
jg 0x4404d2
mov dword [ebp - 0x424], 0
cmp dword [esi], 3
je 0x4405b2
mov eax, edi
add eax, dword [ebp - 4]
add eax, dword [ebp - 0x424]
cmp eax, 0x100
jle 0x440520
mov eax, 0x2b
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
push edi
push edx
push dword [ebp - 0xc]
call fcn.004c3ac0
add esp, 0xc
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x424], 0
lea eax, [edi + eax]
je 0x44053f
mov byte [eax], 0x5c
push dword [ebp - 4]
push dword [ebp - 8]
add eax, dword [ebp - 0x424]
push eax
call fcn.004c3ac0
add esp, 0xc
mov eax, dword [ebp - 4]
xor ecx, ecx
add eax, dword [ebp - 0xc]
add edi, dword [ebp - 0x424]
mov byte [edi + eax], 0
jmp 0x440201
lea eax, [ebp - 0x20]
push eax
lea edi, [ebp - 0x121]
push edi
push 0x101
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x440595
cmp eax, 0x101
jae 0x440595
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
xor edx, edx
xor edi, edi
jmp 0x4404e9
xor eax, eax
cmp byte [edi + edx], 0x5c
setne al
mov dword [ebp - 0x424], eax
jmp 0x4404f3
test byte [ebx + 0x169], 0x20
jne 0x4404fc
cmp dword [esi + 0xc], 0
je 0x4405fd
lea edi, [ebp - 0x323]
push edi
push 0
push 0x4ea1b8
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test byte [ebx + 0x171], 8
je 0x4405e9
lea edi, [ebp - 0x321]
mov esi, dword [ebp - 0xc]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x4405ec
xor ecx, ecx
jmp 0x440201
test byte [ebx + 0x171], 8
je 0x44061c
mov byte [ebp - 0x424], 0x2e
lea edx, [ebp - 0x424]
mov byte [ebp - 0x423], 0
jmp 0x4405c5
push str.FORT_TMPDIR
call fcn.00479950
add esp, 4
test eax, eax
je 0x44064a
mov edi, eax
lea esi, [ebp - 0x424]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x440635
lea edx, [ebp - 0x424]
jmp 0x4405c5
lea esi, [ebp - 0x424]
push esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov edx, esi
jne 0x4405c5
mov edx, 0
jmp 0x4405c5
cmp dword [esi], 3
je 0x44067f
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x4401f4
test byte [ebx + 0x169], 0x20
je 0x44056b
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x4401f4
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONIN_
mov dword [ebp - 8], str.CONIN_
mov dword [ebp - 0x1c], 0
jmp 0x4400fc
movzx eax, byte [ebx + 0x171]
test al, 4
je 0x4406d4
test byte [ebx + 0x168], 1
je 0x440043
push str.FOR_READ
call fcn.00479950
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
jne 0x4400f5
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebx + 0xe4], eax
mov edi, str.CONIN_
mov dword [ebp - 8], str.CONIN_
mov dword [ebp - 0x1c], 0
jmp 0x4400fc
test byte [ebx + 0x169], 0x20
jne 0x43fffe
push str.SCRATCH
lea edi, [ebp - 0x222]
push edi
call fcn.004792a0
add esp, 8
mov dword [ebp - 8], edi
mov eax, 7
mov dword [ebp - 4], 7
mov dword [ebp - 0x1c], 1
jmp 0x440186
test byte [ebx + 0x168], 1
jne 0x4400a3
jmp 0x44005c
test byte [ebx + 0x168], 1
jne 0x4400bf
jmp 0x44005a