Function at 0x43a9bc
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 0x43b0ca
mov ecx, dword [ebx + 0x100]
cmp ecx, 0xfffffffc
je 0x43b076
cmp ecx, 0xfffffffd
je 0x43aa1c
cmp ecx, 0xfffffffe
jne 0x43aa09
test byte [ebx + 0x179], 4
je 0x43aa9f
jmp 0x43b118
cmp ecx, 0xffffffff
jne 0x43aa3c
test byte [ebx + 0x179], 4
je 0x43aa83
jmp 0x43b106
movzx eax, byte [ebx + 0x179]
test al, 4
je 0x43aabb
test byte [ebx + 0x170], 1
jne 0x43aabb
jne 0x43aa9f
jne 0x43aa83
mov edx, dword [esi + 4]
test edx, edx
je 0x43ac2a
mov eax, dword [esi + 8]
cmp eax, 0x100
lea ecx, [ebp - 0x222]
mov dword [ebp - 8], ecx
jl 0x43aa5f
mov eax, 0x100
push eax
push edx
push ecx
mov dword [ebp - 4], eax
call fcn.004c4a20
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 0x43aafb
push str.FOR_PRINT
call fcn.00472620
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x43add7
jmp 0x43aad5
push str.FOR_TYPE
call fcn.00472620
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x43adf9
jmp 0x43aad5
push str.FOR_ACCEPT
call fcn.00472620
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x43b054
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x43aaf5
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x43aae0
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
cmp edx, 0x20
jne 0x43ab11
test eax, eax
jle 0x43ab24
inc edi
dec eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
cmp byte [edi], 0x20
je 0x43ab00
test eax, eax
jle 0x43ab24
test byte [eax + edi - 1], 0xdf
jne 0x43ab52
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x43ab15
jne 0x43ab52
test byte [ebx + 0x179], 4
je 0x43ab52
mov eax, ebx
lea edx, [ebp - 8]
lea ecx, [ebp - 4]
call fcn.0043b130
test eax, eax
jne 0x43ab45
mov edi, dword [ebp - 8]
jmp 0x43ab52
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 0x43ab5c
xor ecx, ecx
jmp 0x43abcd
mov eax, dword [ebp - 4]
push edi
push ebx
mov byte [edi + eax], 0
call fcn.00430670
add esp, 8
cmp eax, 0xffffffff
je 0x43ae37
cmp dword [0x50bf40], 0
jne 0x43ab84
cmp eax, 0xfffffffa
je 0x43abb7
cmp eax, 1
je 0x43abb7
test eax, eax
jne 0x43ab97
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x43abbf
cmp eax, 2
jne 0x43aba6
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x43abbf
mov dword [ebp - 0x1c], 0
mov ecx, 1
mov edi, dword [ebp - 8]
jmp 0x43abcd
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 0x43abd0
mov edx, dword [ebp + 0x14]
cmp dword [0x50bf40], 0
je 0x43abfb
cmp dword [ebp - 0x1c], 0
jne 0x43ac0a
cmp dword [ebx + 0xe4], 0xffffffff
je 0x43ae1b
jmp 0x43ac0a
cmp dword [ebp - 0x1c], 0
jne 0x43ac0a
cmp dword [ebx + 0xe4], 0xffffffff
je 0x43ac0e
test ecx, ecx
je 0x43ac16
mov dword [edx], 1
jmp 0x43ac1b
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.00471b40
lea eax, [ebp - 0x222]
push eax
call fcn.00472620
add esp, 0x10
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x43ac7f
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x43ac6d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x43ac58
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 1
jmp 0x43aafb
mov eax, dword [ebx + 0x100]
add eax, 4
cmp eax, 0xa
ja case.0x43ac91.1
jmp dword [eax*4 + 0x4e5954]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca0
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
jmp 0x43acde
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca0
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
jmp 0x43acde
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca8
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
test edi, edi
je 0x43adcb
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x43acff
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x43acea
dec eax
mov dword [ebp - 4], eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 0
jmp 0x43aafb
mov dword [ebp - 0x1c], 1
test byte [ebx + 0x179], 4
jne 0x43adb6
test byte [ebx + 0x171], 0x20
je 0x43ad6b
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 0x43ad4d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x43ad38
dec eax
mov dword [ebp - 4], eax
cmp dword [esi], 0
je 0x43ad63
mov dword [esi], 0
movsx edx, byte [edi]
jmp 0x43aafb
movsx edx, byte [edi]
jmp 0x43aafb
push dword [ebx + 0x100]
push str.fort._d
lea eax, [ebp - 0x222]
push eax
call fcn.00471b40
add esp, 0xc
lea ecx, [ebp - 0x222]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x43ada2
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x43ad8d
dec eax
mov dword [ebp - 4], eax
lea edi, [ebp - 0x222]
mov dword [ebp - 8], edi
movsx edx, byte [edi]
jmp 0x43aafb
xor eax, eax
lea edi, [ebp - 0x222]
mov dword [ebp - 8], edi
mov byte [edi], al
mov dword [ebp - 4], eax
jmp 0x43ab26
mov dword [ebp - 0x1c], 0
jmp 0x43ad18
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca0
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], 0
jmp 0x43aadc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca0
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], 0
jmp 0x43aadc
test ecx, ecx
jne 0x43ac0e
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0xe4], 0
mov dword [edx], eax
jmp 0x43ac1b
mov eax, dword [esi + 0xc]
test byte [ebx + 0x179], 8
jne 0x43ae4d
test eax, eax
je 0x43af29
jmp 0x43ae55
test eax, eax
je 0x43b02e
mov edi, dword [esi + 0x10]
cmp edi, 0xff
jg 0x43aecc
push edi
push eax
lea edx, [ebp - 0x121]
push edx
call fcn.004c4a20
add esp, 0xc
mov byte [ebp + edi - 0x121], 0
lea edx, [ebp - 0x121]
cmp byte [ebp - 0x121], 0x20
jne 0x43ae93
test edi, edi
jle 0x43aea7
inc edx
dec edi
cmp byte [edx], 0x20
je 0x43ae88
test edi, edi
jle 0x43aea7
test byte [edi + edx - 1], 0xdf
jne 0x43af5c
dec edi
test edi, edi
jg 0x43ae97
mov dword [ebp - 0x424], 0
cmp dword [esi], 3
je 0x43af70
mov eax, edi
add eax, dword [ebp - 4]
add eax, dword [ebp - 0x424]
cmp eax, 0x100
jle 0x43aede
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.004c4a20
add esp, 0xc
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x424], 0
lea eax, [edi + eax]
je 0x43aefd
mov byte [eax], 0x5c
push dword [ebp - 4]
push dword [ebp - 8]
add eax, dword [ebp - 0x424]
push eax
call fcn.004c4a20
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 0x43abda
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 0x43af53
cmp eax, 0x101
jae 0x43af53
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
xor edx, edx
xor edi, edi
jmp 0x43aea7
xor eax, eax
cmp byte [edi + edx], 0x5c
setne al
mov dword [ebp - 0x424], eax
jmp 0x43aeb1
test byte [ebx + 0x171], 0x20
jne 0x43aeba
cmp dword [esi + 0xc], 0
je 0x43afbb
lea edi, [ebp - 0x323]
push edi
push 0
push 0x4e5afc
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test byte [ebx + 0x179], 8
je 0x43afa7
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 0x43afaa
xor ecx, ecx
jmp 0x43abda
test byte [ebx + 0x179], 8
je 0x43afda
mov byte [ebp - 0x424], 0x2e
lea edx, [ebp - 0x424]
mov byte [ebp - 0x423], 0
jmp 0x43af83
push str.FORT_TMPDIR
call fcn.00472620
add esp, 4
test eax, eax
je 0x43b008
mov edi, eax
lea esi, [ebp - 0x424]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x43aff3
lea edx, [ebp - 0x424]
jmp 0x43af83
lea esi, [ebp - 0x424]
push esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov edx, esi
jne 0x43af83
mov edx, 0
jmp 0x43af83
cmp dword [esi], 3
je 0x43b03d
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x43abcd
test byte [ebx + 0x171], 0x20
je 0x43af29
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x43abcd
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca8
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], 0
jmp 0x43aadc
movzx eax, byte [ebx + 0x179]
test al, 4
je 0x43b08e
test byte [ebx + 0x170], 1
je 0x43aa23
push str.FOR_READ
call fcn.00472620
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
jne 0x43aad5
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, 0x4e2ca8
mov dword [ebx + 0xe4], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], 0
jmp 0x43aadc
test byte [ebx + 0x171], 0x20
jne 0x43a9de
push str.SCRATCH
lea edi, [ebp - 0x222]
push edi
call fcn.00471b40
add esp, 8
mov dword [ebp - 8], edi
mov eax, 7
mov dword [ebp - 4], 7
mov dword [ebp - 0x1c], 1
jmp 0x43ab5f
test byte [ebx + 0x170], 1
jne 0x43aa83
jmp 0x43aa3c
test byte [ebx + 0x170], 1
jne 0x43aa9f
jmp 0x43aa3a