Function at 0x41b08c
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 0x41b84c
mov ecx, dword [ebx + 0xf8]
cmp ecx, 0xfffffffc
je 0x41b7d8
cmp ecx, 0xfffffffd
je 0x41b0fc
cmp ecx, 0xfffffffe
jne 0x41b0e3
test byte [ebx + 0x169], 4
je 0x41b1a4
test byte [ebx + 0x160], 1
jne 0x41b1a4
jmp 0x41b11e
cmp ecx, 0xffffffff
jne 0x41b120
test byte [ebx + 0x169], 4
je 0x41b16a
test byte [ebx + 0x160], 1
jne 0x41b16a
jmp 0x41b120
movzx eax, byte [ebx + 0x169]
test al, 4
je 0x41b1de
test byte [ebx + 0x160], 1
jne 0x41b1de
jne 0x41b1a4
jne 0x41b16a
mov edx, dword [esi + 4]
test edx, edx
je 0x41b352
lea ecx, [ebp - 0x121]
mov eax, dword [esi + 8]
mov dword [ebp - 8], ecx
cmp eax, 0x100
jle 0x41b143
mov eax, 0x100
mov dword [ebp - 4], eax
push eax
push edx
push ecx
call fcn.004a2e20
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 0x41b21c
push str.FOR_PRINT
call fcn.004519b0
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x41b50e
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b1a2
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b18d
dec eax
jmp 0x41b216
push str.FOR_TYPE
call fcn.004519b0
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x41b534
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b1dc
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b1c7
dec eax
jmp 0x41b216
push str.FOR_ACCEPT
call fcn.004519b0
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x41b7b2
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b216
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b201
dec eax
movsx edx, byte [edi]
mov dword [ebp - 4], eax
cmp edx, 0x20
jne 0x41b232
test eax, eax
jle 0x41b24c
inc edi
mov dword [ebp - 8], edi
dec eax
cmp byte [edi], 0x20
mov dword [ebp - 4], eax
je 0x41b221
test eax, eax
jle 0x41b24c
movsx edx, byte [eax + edi - 1]
cmp edx, 0x20
je 0x41b244
test edx, edx
jne 0x41b27a
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x41b236
jne 0x41b27a
test byte [ebx + 0x169], 4
je 0x41b27a
lea edx, [ebp - 8]
lea ecx, [ebp - 4]
mov eax, ebx
call fcn.0041b890
test eax, eax
jne 0x41b26d
mov edi, dword [ebp - 8]
jmp 0x41b27a
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 0x41b284
xor ecx, ecx
jmp 0x41b2f5
mov eax, dword [ebp - 4]
mov byte [edi + eax], 0
push edi
push ebx
call fcn.004053b0
add esp, 8
cmp eax, 0xffffffff
je 0x41b571
cmp dword [0x4e8dc0], 0
jne 0x41b2ac
cmp eax, 0xfffffffa
je 0x41b2df
cmp eax, 1
je 0x41b2df
test eax, eax
jne 0x41b2bf
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x41b2e7
cmp eax, 2
jne 0x41b2ce
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x41b2e7
mov edi, dword [ebp - 8]
mov dword [ebp - 0x1c], 0
mov ecx, 1
jmp 0x41b2f5
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 0x41b2f8
cmp dword [0x4e8dc0], 0
mov edx, dword [ebp + 0x14]
je 0x41b323
cmp dword [ebp - 0x1c], 0
jne 0x41b332
cmp dword [ebx + 0xdc], 0xffffffff
je 0x41b55a
jmp 0x41b332
cmp dword [ebp - 0x1c], 0
jne 0x41b332
cmp dword [ebx + 0xdc], 0xffffffff
je 0x41b336
test ecx, ecx
je 0x41b33e
mov dword [edx], 1
jmp 0x41b343
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.00452740
lea eax, [ebp - 0x121]
push eax
call fcn.004519b0
add esp, 0x10
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x41b3a7
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b395
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b380
dec eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], eax
jmp 0x41b21c
mov eax, dword [ebx + 0xf8]
add eax, 4
cmp eax, 0xa
ja case.0x41b3bc.1
mov eax, dword [eax*4 + 0x4c3ae0]
jmp eax
mov dword [ebp - 0x1c], 1
jmp 0x41b44f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be288
mov dword [ebx + 0xdc], eax
mov edi, 0x4be288
jmp 0x41b41c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be288
mov dword [ebx + 0xdc], eax
mov edi, 0x4be288
jmp 0x41b41c
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be280
mov dword [ebx + 0xdc], eax
mov edi, 0x4be280
test edi, edi
je 0x41b502
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b43d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b428
dec eax
movsx edx, byte [edi]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], eax
jmp 0x41b21c
test byte [ebx + 0x169], 4
jne 0x41b4ed
test byte [ebx + 0x161], 0x20
je 0x41b4a2
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 0x41b484
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b46f
dec eax
cmp dword [esi], 0
mov dword [ebp - 4], eax
je 0x41b49a
mov dword [esi], 0
movsx edx, byte [edi]
jmp 0x41b21c
movsx edx, byte [edi]
jmp 0x41b21c
push dword [ebx + 0xf8]
push str.fort._d
lea eax, [ebp - 0x121]
push eax
call fcn.00452740
add esp, 0xc
lea ecx, [ebp - 0x121]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b4d9
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b4c4
dec eax
mov dword [ebp - 4], eax
lea edi, [ebp - 0x121]
movsx edx, byte [edi]
mov dword [ebp - 8], edi
jmp 0x41b21c
lea edi, [ebp - 0x121]
mov dword [ebp - 8], edi
xor eax, eax
mov dword [ebp - 4], eax
mov byte [edi], al
jmp 0x41b24e
mov dword [ebp - 0x1c], 0
jmp 0x41b44f
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be288
mov dword [ebx + 0xdc], eax
mov edi, 0x4be288
mov dword [ebp - 0x1c], 0
jmp 0x41b189
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be288
mov dword [ebx + 0xdc], eax
mov edi, 0x4be288
mov dword [ebp - 0x1c], 0
jmp 0x41b1c3
test ecx, ecx
jne 0x41b336
mov dword [ebx + 0xdc], 0
jmp 0x41b33e
mov edx, dword [esi + 0xc]
test byte [ebx + 0x169], 8
jne 0x41b587
test edx, edx
je 0x41b684
jmp 0x41b58f
test edx, edx
je 0x41b78c
mov edi, dword [esi + 0x10]
lea eax, [edi + 1]
cmp eax, 0x100
jle 0x41b5ae
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.004a2e20
add esp, 0xc
mov byte [ebp + edi - 0x222], 0
lea edx, [ebp - 0x222]
cmp byte [ebp - 0x222], 0x20
jne 0x41b5e1
test edi, edi
jle 0x41b5fc
inc edx
dec edi
cmp byte [edx], 0x20
je 0x41b5d6
test edi, edi
jle 0x41b5fc
movsx eax, byte [edi + edx - 1]
cmp eax, 0x20
je 0x41b5f7
test eax, eax
jne 0x41b6b7
dec edi
test edi, edi
jg 0x41b5e5
mov dword [ebp - 0x424], 0
cmp dword [esi], 3
je 0x41b6d3
mov eax, dword [ebp - 0x424]
add eax, dword [ebp - 4]
add eax, edi
cmp eax, 0x100
jle 0x41b633
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.004a2e20
add esp, 0xc
cmp dword [ebp - 0x424], 0
je 0x41b650
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.004a2e20
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 0x41b302
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 0x41b6ae
cmp eax, 0x101
jae 0x41b6ae
mov dword [ebp - 8], edi
mov dword [ebp - 4], eax
xor edx, edx
xor edi, edi
jmp 0x41b5fc
test edi, edi
jle 0x41b5fc
xor eax, eax
cmp byte [edi + edx], 0x5c
setne al
mov dword [ebp - 0x424], eax
jmp 0x41b606
test byte [ebx + 0x161], 0x20
jne 0x41b60f
cmp dword [esi + 0xc], 0
je 0x41b71e
lea edi, [ebp - 0x323]
push edi
push 0
push 0x4c3c80
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test byte [ebx + 0x169], 8
je 0x41b70a
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 0x41b70d
xor ecx, ecx
jmp 0x41b302
test byte [ebx + 0x169], 8
je 0x41b73d
mov byte [ebp - 0x424], 0x2e
lea edx, [ebp - 0x424]
mov byte [ebp - 0x423], 0
jmp 0x41b6e6
push str.FORT_TMPDIR
call fcn.004519b0
pop ecx
test eax, eax
je 0x41b766
lea esi, [ebp - 0x424]
mov edi, eax
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x41b754
lea edx, [ebp - 0x424]
jmp 0x41b6e6
lea esi, [ebp - 0x424]
push esi
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov edx, esi
jne 0x41b6e6
mov edx, 0
jmp 0x41b6e6
cmp dword [esi], 3
je 0x41b79b
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x41b2f5
test byte [ebx + 0x161], 0x20
je 0x41b684
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x41b2f5
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be280
mov dword [ebx + 0xdc], eax
mov edi, 0x4be280
mov dword [ebp - 0x1c], 0
jmp 0x41b1fd
movzx eax, byte [ebx + 0x169]
test al, 4
je 0x41b7f0
test byte [ebx + 0x160], 1
je 0x41b103
push str.FOR_READ
call fcn.004519b0
pop ecx
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x41b829
mov dword [ebp - 0x1c], 1
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x41b824
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x41b80f
dec eax
jmp 0x41b216
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 8], 0x4be280
mov dword [ebx + 0xdc], eax
mov edi, 0x4be280
mov dword [ebp - 0x1c], 0
jmp 0x41b80b
test byte [ebx + 0x161], 0x20
jne 0x41b0ae
push str.SCRATCH
lea edi, [ebp - 0x121]
push edi
call fcn.00452740
add esp, 8
mov dword [ebp - 4], 7
mov dword [ebp - 8], edi
mov eax, 7
mov dword [ebp - 0x1c], 1
jmp 0x41b287