Function at 0x1007a32a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ecx
mov ebx, edx
mov dword [ebp - 0xc], eax
mov eax, dword [ebx]
cmp eax, 3
je 0x1007a877
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc8]
cmp eax, 0xfffffffc
je 0x1007a7e7
cmp eax, 0xfffffffd
je 0x10079fe4
cmp eax, 0xfffffffe
jne 0x10079fca
mov edx, dword [ebp - 0xc]
movzx ecx, byte [edx + 0x131]
test cl, 1
je 0x1007a0ba
jmp 0x1007a007
cmp eax, 0xffffffff
jne 0x1007a023
mov edx, dword [ebp - 0xc]
movzx ecx, byte [edx + 0x131]
test cl, 1
je 0x1007a074
jmp 0x1007a017
mov edx, dword [ebp - 0xc]
movzx ecx, byte [edx + 0x131]
test cl, 1
je 0x1007a0fd
movzx ecx, byte [edx + 0x128]
test cl, 1
jne 0x1007a0fd
movzx ecx, byte [edx + 0x128]
test cl, 1
jne 0x1007a0ba
movzx ecx, byte [edx + 0x128]
test cl, 1
jne 0x1007a074
mov edx, dword [ebx + 4]
test edx, edx
je 0x1007a2b4
lea ecx, [ebp - 0x12c]
mov eax, dword [ebx + 8]
mov dword [ebp - 8], ecx
cmp eax, 0x100
jle 0x1007a046
mov eax, pe_nt_image_headers32
mov dword [ebp - 4], eax
push eax
push edx
push ecx
call fcn.1007f4d4
add esp, 0xc
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov byte [eax + edi], 0
mov edx, 1
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edx
jmp 0x1007a141
push str.FOR_PRINT
call fcn.100908fc
mov dword [ebp - 0x24], eax
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x1007a4af
mov eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a0b5
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a09e
add eax, 0xffffffff
jmp 0x1007a13e
push str.FOR_TYPE
call fcn.100908fc
mov dword [ebp - 0x24], eax
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x1007a4de
mov eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a0fb
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a0e4
add eax, 0xffffffff
jmp 0x1007a13e
push str.FOR_ACCEPT
call fcn.100908fc
mov dword [ebp - 0x24], eax
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x1007a7b8
mov eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a13e
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a127
add eax, 0xffffffff
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x24]
movsx ecx, byte [edx]
cmp ecx, 0x20
jne 0x1007a169
test eax, eax
jle 0x1007a187
add edx, 1
mov dword [ebp - 8], edx
mov edi, edx
add eax, 0xffffffff
mov dword [ebp - 4], eax
movsx ecx, byte [edx]
cmp ecx, 0x20
je 0x1007a14c
mov dword [ebp - 0x24], edx
test eax, eax
jle 0x1007a187
mov ecx, edx
movsx edx, byte [eax + ecx - 1]
cmp edx, 0x20
je 0x1007a17d
test edx, edx
jne 0x1007a1bc
add eax, 0xffffffff
mov dword [ebp - 4], eax
test eax, eax
jg 0x1007a16f
jne 0x1007a1bc
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x131]
test dl, 1
je 0x1007a1bc
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 8]
lea ecx, [ebp - 4]
call fcn.1007a8c0
test eax, eax
jne 0x1007a1af
mov edi, dword [ebp - 8]
jmp 0x1007a1bc
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x1007a1c7
xor ecx, ecx
jmp 0x1007a244
mov eax, dword [ebp - 4]
mov byte [eax + edi], 0
mov eax, dword [ebp - 0xc]
push dword [ebp - 8]
push eax
call fcn.1002aeb0
add esp, 8
cmp eax, 0xffffffff
je 0x1007a524
mov edx, dword [0x100d9158]
test edx, edx
jne 0x1007a1fa
cmp eax, 0xfffffffa
jne 0x1007a1fa
mov eax, 1
cmp eax, 1
je 0x1007a22b
test eax, eax
jne 0x1007a20d
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x1007a233
cmp eax, 2
jne 0x1007a21c
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x1007a233
mov edi, dword [ebp - 8]
xor eax, eax
mov dword [ebp - 0x20], eax
mov ecx, 1
jmp 0x1007a244
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov dword [ecx + 0xb4], eax
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov esi, dword [ebp - 0x10]
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x1007a247
mov eax, dword [0x100d9158]
test eax, eax
je 0x1007a279
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x1007a28e
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0xb4]
cmp edx, 0xffffffff
je 0x1007a50d
jmp 0x1007a28e
mov eax, dword [ebp - 0x20]
test eax, eax
jne 0x1007a28e
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 0xb4]
cmp edx, 0xffffffff
je 0x1007a292
test ecx, ecx
je 0x1007a29d
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
jmp 0x1007a2a5
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0x20]
mov dword [edx], eax
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x12c]
push eax
push str.FORT_d
push edx
call fcn.100907f2
lea eax, [ebp - 0x12c]
push eax
call fcn.100908fc
mov dword [ebp - 0x24], eax
add esp, 0x10
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x1007a30c
mov ecx, eax
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a2fc
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a2e5
add eax, 0xffffffff
mov dword [ebp - 4], eax
mov edx, 1
mov dword [ebp - 0x20], edx
jmp 0x1007a141
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc8]
add eax, 4
cmp eax, 0xa
ja case.default.0x1007a328
mov eax, dword [eax*4 + 0x100c1454]
jmp eax
mov eax, 1
mov dword [ebp - 0x20], eax
jmp 0x1007a3e2
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c0
mov dword [edx + 0xb4], eax
mov eax, 0x100bd0c0
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c0
jmp 0x1007a3aa
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c0
mov dword [edx + 0xb4], eax
mov eax, 0x100bd0c0
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c0
jmp 0x1007a3aa
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c8
mov dword [edx + 0xb4], eax
mov eax, 0x100bd0c8
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c8
test eax, eax
je 0x1007a4a5
mov ecx, eax
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a3cd
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a3b6
add eax, 0xffffffff
mov dword [ebp - 4], eax
xor edx, edx
mov dword [ebp - 0x20], edx
jmp 0x1007a141
mov eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x131]
test dl, 1
jne 0x1007a490
movzx edx, byte [eax + 0x129]
test dl, 0x20
je 0x1007a43d
mov edi, dword [eax + 0x60]
mov dword [ebp - 0x24], edi
mov dword [ebp - 8], edi
mov ecx, edi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a425
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a40e
add eax, 0xffffffff
mov edx, dword [ebx]
mov dword [ebp - 4], eax
test edx, edx
je 0x1007a141
mov dword [ebx], 0
jmp 0x1007a141
push dword [eax + 0xc8]
lea edx, [ebp - 0x12c]
push str.fort._d
push edx
call fcn.100907f2
add esp, 0xc
lea ecx, [ebp - 0x12c]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a476
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a45f
add eax, 0xffffffff
lea edx, [ebp - 0x12c]
mov dword [ebp - 0x24], edx
mov dword [ebp - 4], eax
lea edi, [ebp - 0x12c]
mov dword [ebp - 8], edx
jmp 0x1007a141
lea esi, [ebp - 0x12c]
mov dword [ebp - 8], esi
xor eax, eax
mov byte [esi], al
mov dword [ebp - 4], eax
jmp 0x1007a198
xor eax, eax
mov dword [ebp - 0x20], eax
jmp 0x1007a3e2
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c0
mov dword [edi + 0xb4], eax
mov eax, 0x100bd0c0
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c0
xor edx, edx
mov dword [ebp - 0x20], edx
jmp 0x1007a099
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c0
mov dword [edi + 0xb4], eax
mov eax, 0x100bd0c0
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c0
xor edx, edx
mov dword [ebp - 0x20], edx
jmp 0x1007a0df
test ecx, ecx
jne 0x1007a292
mov dword [eax + 0xb4], 0
jmp 0x1007a29d
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x131]
test dl, 2
jne 0x1007a540
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x1007a665
jmp 0x1007a54b
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x1007a78a
mov esi, dword [ebx + 0x10]
lea eax, [esi + 1]
cmp eax, 0x100
jle 0x1007a56a
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, 0x2b
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x230]
push esi
push edx
push eax
call fcn.1007f4d4
add esp, 0xc
mov byte [ebp + esi - 0x230], 0
lea eax, [ebp - 0x230]
mov dword [ebp - 0x24], eax
movsx edx, byte [eax]
cmp edx, 0x20
jne 0x1007a5ad
test esi, esi
jle 0x1007a782
add eax, 1
movsx edx, byte [eax]
add esi, 0xffffffff
cmp edx, 0x20
je 0x1007a594
mov dword [ebp - 0x24], eax
test esi, esi
jle 0x1007a5cf
mov edx, eax
movsx eax, byte [edx + esi - 1]
cmp eax, 0x20
je 0x1007a5c5
test eax, eax
jne 0x1007a6a1
add esi, 0xffffffff
test esi, esi
jg 0x1007a5b3
mov dword [ebp - 0x24], edx
xor eax, eax
mov dword [ebp - 0x438], eax
mov eax, dword [ebx]
cmp eax, 3
je 0x1007a6c5
mov eax, dword [ebp - 0x438]
add eax, dword [ebp - 4]
add eax, esi
cmp eax, 0x100
jle 0x1007a606
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, 0x2b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x10]
push esi
push eax
push edx
call fcn.1007f4d4
add esp, 0xc
mov eax, dword [ebp - 0x438]
test eax, eax
je 0x1007a631
mov edi, dword [ebp - 0x10]
lea ecx, [esi + edi]
mov eax, 0x100c15ac
movzx edx, byte [eax]
mov byte [ecx], dl
push dword [ebp - 4]
push dword [ebp - 8]
mov eax, dword [ebp - 0x438]
mov edi, dword [ebp - 0x10]
lea edx, [edi + eax]
add edx, esi
push edx
call fcn.1007f4d4
add esp, 0xc
add esi, dword [ebp - 0x438]
mov eax, dword [ebp - 4]
xor ecx, ecx
add eax, dword [ebp - 0x10]
mov byte [esi + eax], 0
jmp 0x1007a255
lea edx, [ebp - 0x230]
lea eax, [ebp - 0x28]
push eax
push edx
push 0x101
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x1007a695
cmp eax, 0x101
jae 0x1007a695
lea edx, [ebp - 0x230]
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0x24], eax
xor esi, esi
jmp 0x1007a5cf
mov dword [ebp - 0x24], edx
test esi, esi
jle 0x1007a5cf
mov edi, edx
movsx eax, byte [edi + esi]
xor edx, edx
cmp eax, 0x5c
setne dl
mov dword [ebp - 0x438], edx
jmp 0x1007a5d7
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x129]
test dl, 0x20
jne 0x1007a5e2
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x1007a72c
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x334]
push eax
push 0
push 0x100c15b0
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x131]
test dl, 2
je 0x1007a70e
lea edi, [ebp - 0x332]
jmp 0x1007a714
lea edi, [ebp - 0x334]
mov esi, dword [ebp - 0x10]
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x1007a717
xor ecx, ecx
jmp 0x1007a255
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x131]
test dl, 2
je 0x1007a754
mov byte [ebp - 0x438], 0x2e
lea eax, [ebp - 0x438]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x437], 0
jmp 0x1007a6df
lea eax, [ebp - 0x438]
push eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x1007a778
lea eax, [ebp - 0x438]
mov dword [ebp - 0x24], eax
jmp 0x1007a6df
xor eax, eax
mov dword [ebp - 0x24], eax
jmp 0x1007a6df
mov dword [ebp - 0x24], eax
jmp 0x1007a5cf
mov eax, dword [ebx]
cmp eax, 3
je 0x1007a79b
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x1007a244
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x129]
test dl, 0x20
je 0x1007a665
mov edi, dword [ebp - 8]
xor ecx, ecx
jmp 0x1007a244
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c8
mov dword [edi + 0xb4], eax
mov eax, 0x100bd0c8
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c8
xor edx, edx
mov dword [ebp - 0x20], edx
jmp 0x1007a122
mov edx, dword [ebp - 0xc]
movzx ecx, byte [edx + 0x131]
test cl, 1
je 0x1007a809
movzx esi, byte [edx + 0x128]
test esi, 1
je 0x10079fee
push str.FOR_READ
call fcn.100908fc
mov dword [ebp - 0x24], eax
add esp, 4
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x1007a84b
mov eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x24]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x1007a846
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x1007a82f
add eax, 0xffffffff
jmp 0x1007a13e
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, dword [ebp - 0xc]
mov dword [ebp - 8], 0x100bd0c8
mov dword [edi + 0xb4], eax
mov eax, 0x100bd0c8
mov dword [ebp - 0x24], eax
mov edi, 0x100bd0c8
xor edx, edx
mov dword [ebp - 0x20], edx
jmp 0x1007a82a
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 0x129]
test dl, 0x20
jne 0x10079f99
push str.SCRATCH
lea eax, [ebp - 0x12c]
push eax
call fcn.100907f2
add esp, 8
mov dword [ebp - 4], 7
lea edi, [ebp - 0x12c]
mov eax, 7
mov edx, 1
mov dword [ebp - 8], edi
mov dword [ebp - 0x20], edx
jmp 0x1007a1ca