Function at 0x429a0c
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], ecx
mov esi, edx
cmp dword [esi], 3
mov ebx, eax
je 0x42a1cc
mov ecx, dword [ebx + 0xf8]
cmp ecx, 0xfffffffc
je 0x42a158
cmp ecx, 0xfffffffd
je 0x429a7c
cmp ecx, 0xfffffffe
jne 0x429a63
test byte [ebx + 0x169], 4
je 0x429b24
test byte [ebx + 0x160], 1
jne 0x429b24
jmp 0x429a9e
cmp ecx, 0xffffffff
jne 0x429aa0
test byte [ebx + 0x169], 4
je 0x429aea
test byte [ebx + 0x160], 1
jne 0x429aea
jmp 0x429aa0
movzx eax, byte [ebx + 0x169]
test al, 4
je 0x429b5e
test byte [ebx + 0x160], 1
jne 0x429b5e
jne 0x429b24
jne 0x429aea
mov edx, dword [esi + 4]
test edx, edx
je 0x429cd2
lea ecx, [ebp - 0x121]
mov eax, dword [esi + 8]
mov dword [ebp - 8], ecx
cmp eax, 0x100
jle 0x429ac3
mov eax, 0x100
mov dword [ebp - 4], eax
push eax
push edx
push ecx
call fcn.004ae9a0
add esp, 0xc
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov byte [edi + eax], 0
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 1
jmp 0x429b9c
push str.FOR_PRINT
call fcn.0045bc70
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x429e8e
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429b22
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429b0d
dec eax
jmp 0x429b96
push str.FOR_TYPE
call fcn.0045bc70
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x429eb4
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429b5c
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429b47
dec eax
jmp 0x429b96
push str.FOR_ACCEPT
call fcn.0045bc70
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x42a132
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429b96
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429b81
dec eax
movsx edx, byte [edi]
mov dword [ebp - 4], eax
cmp edx, 0x20
jne 0x429bb2
test eax, eax
jle 0x429bcc
inc edi
mov dword [ebp - 8], edi
dec eax
cmp byte [edi], 0x20
mov dword [ebp - 4], eax
je 0x429ba1
test eax, eax
jle 0x429bcc
movsx edx, byte [eax + edi - 1]
cmp edx, 0x20
je 0x429bc4
test edx, edx
jne 0x429bfa
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x429bb6
jne 0x429bfa
test byte [ebx + 0x169], 4
je 0x429bfa
lea edx, [ebp - 8]
lea ecx, [ebp - 4]
mov eax, ebx
call fcn.0042a210
test eax, eax
jne 0x429bed
mov edi, dword [ebp - 8]
jmp 0x429bfa
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 0x429c04
xor ecx, ecx
jmp 0x429c75
mov eax, dword [ebp - 4]
mov byte [edi + eax], 0
push edi
push ebx
call fcn.004156d0
add esp, 8
cmp eax, 0xffffffff
je 0x429ef1
cmp dword [0x4fb140], 0
jne 0x429c2c
cmp eax, 0xfffffffa
je 0x429c5f
cmp eax, 1
je 0x429c5f
test eax, eax
jne 0x429c3f
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x429c67
cmp eax, 2
jne 0x429c4e
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x429c67
mov edi, dword [ebp - 8]
mov dword [ebp - 0x1c], 0
mov ecx, 1
jmp 0x429c75
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp - 8]
mov dword [ebx + 0xdc], eax
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov esi, dword [ebp - 0xc]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x429c78
cmp dword [0x4fb140], 0
mov edx, dword [ebp + 0x14]
je 0x429ca3
cmp dword [ebp - 0x1c], 0
jne 0x429cb2
cmp dword [ebx + 0xdc], 0xffffffff
je 0x429eda
jmp 0x429cb2
cmp dword [ebp - 0x1c], 0
jne 0x429cb2
cmp dword [ebx + 0xdc], 0xffffffff
je 0x429cb6
test ecx, ecx
je 0x429cbe
mov dword [edx], 1
jmp 0x429cc3
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
xor eax, eax
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x121]
push ecx
push str.FORT_d
push eax
call fcn.0045b620
lea eax, [ebp - 0x121]
push eax
call fcn.0045bc70
add esp, 0x10
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x429d27
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429d15
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429d00
dec eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], eax
jmp 0x429b9c
mov eax, dword [ebx + 0xf8]
add eax, 4
cmp eax, 0xa
ja case.0x429d3c.1
mov eax, dword [eax*4 + 0x4d2410]
jmp eax
mov dword [ebp - 0x1c], 1
jmp 0x429dcf
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf958
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf958
jmp 0x429d9c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf958
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf958
jmp 0x429d9c
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf950
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf950
test edi, edi
je 0x429e82
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429dbd
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429da8
dec eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], eax
jmp 0x429b9c
test byte [ebx + 0x169], 4
jne 0x429e6d
test byte [ebx + 0x161], 0x20
je 0x429e22
mov edi, dword [ebx + 0x60]
mov dword [ebp - 8], edi
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429e04
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429def
dec eax
cmp dword [esi], 0
mov dword [ebp - 4], eax
je 0x429e1a
mov dword [esi], 0
movsx edx, byte [edi]
jmp 0x429b9c
movsx edx, byte [edi]
jmp 0x429b9c
push dword [ebx + 0xf8]
push str.fort._d
lea eax, [ebp - 0x121]
push eax
call fcn.0045b620
add esp, 0xc
lea ecx, [ebp - 0x121]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x429e59
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x429e44
dec eax
mov dword [ebp - 4], eax
lea edi, [ebp - 0x121]
movsx edx, byte [edi]
mov dword [ebp - 8], edi
jmp 0x429b9c
lea edi, [ebp - 0x121]
mov dword [ebp - 8], edi
xor eax, eax
mov dword [ebp - 4], eax
mov byte [edi], al
jmp 0x429bce
mov dword [ebp - 0x1c], 0
jmp 0x429dcf
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf958
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf958
mov dword [ebp - 0x1c], 0
jmp 0x429b09
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf958
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf958
mov dword [ebp - 0x1c], 0
jmp 0x429b43
test ecx, ecx
jne 0x429cb6
mov dword [ebx + 0xdc], 0
jmp 0x429cbe
mov edx, dword [esi + 0xc]
test byte [ebx + 0x169], 8
jne 0x429f07
test edx, edx
je 0x42a004
jmp 0x429f0f
test edx, edx
je 0x42a10c
mov edi, dword [esi + 0x10]
lea eax, [edi + 1]
cmp eax, 0x100
jle 0x429f2e
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov eax, 0x2b
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x222]
push edi
push edx
push eax
call fcn.004ae9a0
add esp, 0xc
mov byte [ebp + edi - 0x222], 0
lea edx, [ebp - 0x222]
cmp byte [ebp - 0x222], 0x20
jne 0x429f61
test edi, edi
jle 0x429f7c
inc edx
dec edi
cmp byte [edx], 0x20
je 0x429f56
test edi, edi
jle 0x429f7c
movsx eax, byte [edi + edx - 1]
cmp eax, 0x20
je 0x429f77
test eax, eax
jne 0x42a037
dec edi
test edi, edi
jg 0x429f65
mov dword [ebp - 0x424], 0
cmp dword [esi], 3
je 0x42a053
mov eax, dword [ebp - 0x424]
add eax, dword [ebp - 4]
add eax, edi
cmp eax, 0x100
jle 0x429fb3
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov eax, 0x2b
mov esp, ebp
pop ebp
ret
push edi
push edx
push dword [ebp - 0xc]
call fcn.004ae9a0
add esp, 0xc
cmp dword [ebp - 0x424], 0
je 0x429fd0
mov eax, dword [ebp - 0xc]
mov byte [edi + eax], 0x5c
push dword [ebp - 4]
push dword [ebp - 8]
mov eax, dword [ebp - 0x424]
mov esi, dword [ebp - 0xc]
lea edx, [esi + eax]
add edx, edi
push edx
call fcn.004ae9a0
add esp, 0xc
add edi, dword [ebp - 0x424]
mov eax, dword [ebp - 4]
xor ecx, ecx
add eax, dword [ebp - 0xc]
mov byte [edi + eax], 0
jmp 0x429c82
lea edi, [ebp - 0x222]
lea eax, [ebp - 0x20]
push eax
push edi
push 0x101
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x42a02e
cmp eax, 0x101
jae 0x42a02e
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
xor edx, edx
xor edi, edi
jmp 0x429f7c
test edi, edi
jle 0x429f7c
xor eax, eax
cmp byte [edi + edx], 0x5c
setne al
mov dword [ebp - 0x424], eax
jmp 0x429f86
test byte [ebx + 0x161], 0x20
jne 0x429f8f
cmp dword [esi + 0xc], 0
je 0x42a09e
lea edi, [ebp - 0x323]
push edi
push 0
push 0x4d25b0
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test byte [ebx + 0x169], 8
je 0x42a08a
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 0x42a08d
xor ecx, ecx
jmp 0x429c82
test byte [ebx + 0x169], 8
je 0x42a0bd
mov byte [ebp - 0x424], 0x2e
lea edx, [ebp - 0x424]
mov byte [ebp - 0x423], 0
jmp 0x42a066
push str.FORT_TMPDIR
call fcn.0045bc70
pop ecx
test eax, eax
je 0x42a0e6
lea esi, [ebp - 0x424]
mov edi, eax
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x42a0d4
lea edx, [ebp - 0x424]
jmp 0x42a066
lea esi, [ebp - 0x424]
push esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov edx, esi
jne 0x42a066
mov edx, 0
jmp 0x42a066
cmp dword [esi], 3
je 0x42a11b
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x429c75
test byte [ebx + 0x161], 0x20
je 0x42a004
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x429c75
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf950
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf950
mov dword [ebp - 0x1c], 0
jmp 0x429b7d
movzx eax, byte [ebx + 0x169]
test al, 4
je 0x42a170
test byte [ebx + 0x160], 1
je 0x429a83
push str.FOR_READ
call fcn.0045bc70
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x42a1a9
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x42a1a4
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x42a18f
dec eax
jmp 0x429b96
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4cf950
mov dword [ebx + 0xdc], eax
mov edi, 0x4cf950
mov dword [ebp - 0x1c], 0
jmp 0x42a18b
test byte [ebx + 0x161], 0x20
jne 0x429a2e
push str.SCRATCH
lea edi, [ebp - 0x121]
push edi
call fcn.0045b620
add esp, 8
mov dword [ebp - 4], 7
mov dword [ebp - 8], edi
mov eax, 7
mov dword [ebp - 0x1c], 1
jmp 0x429c07