Function at 0x10004020
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10126628
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x10173500]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
cmp dword [ecx - 0xc], 0
mov esi, dword [ecx - 0x10]
lea eax, [ecx - 0x10]
je 0x100040a6
cmp dword [eax + 0xc], 0
lea edx, [eax + 0xc]
jge 0x10004082
cmp dword [ecx - 8], 0
jge 0x10004072
push 0x80070057
call fcn.10001cb0
mov dword [ecx - 0xc], 0
mov eax, dword [edi]
xor ecx, ecx
mov word [eax], cx
jmp 0x100040a6
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10004098
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [edi], eax
mov ebx, dword [ebp + 8]
mov eax, ebx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x100040b0
movzx edi, word [ebx]
sub eax, edx
sar eax, 1
mov esi, eax
cmp esi, 1
jl 0x100042c9
cmp edi, 0x5c
je 0x100042c9
cmp edi, 0x2e
jne 0x100040f3
cmp esi, 1
je 0x100042c9
cmp esi, 2
jne 0x100040f3
cmp word [ebx + 2], di
je 0x100042c9
call fcn.1001064f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x1000410d
push 0x80004005
call fcn.10001cb0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
mov ebx, 3
cmp esi, ebx
jle 0x10004158
mov eax, dword [ebp + 8]
cmp word [eax + 2], 0x3a
jne 0x10004158
cmp word [eax + 4], 0x5c
jne 0x10004158
cmp edi, 0x61
jb 0x1000414b
cmp edi, 0x7a
jbe 0x100041fb
add edi, 0xffffffbf
cmp di, 0x19
jbe 0x100041fb
mov edx, dword [ebp - 0x10]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x105
or eax, ecx
jge 0x1000417f
push 0x105
lea ecx, [ebp - 0x10]
call fcn.10001c10
mov edx, dword [ebp - 0x10]
push edx
push 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.10102dbd
add esp, 8
test eax, eax
js 0x10004068
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx - 8]
jg 0x10004068
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x10]
xor ecx, ecx
mov word [edx + eax*2], cx
test esi, esi
je 0x100042e0
cmp esi, 0x104
ja 0x100042e0
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx - 0xc]
lea eax, [ecx - 1]
test eax, eax
js 0x10004068
cmp eax, ecx
jg 0x10004068
cmp word [edx + eax*2], 0x5c
je 0x100041fb
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.10004c20
push 0x10152cdc
lea ecx, [ebp - 0x1c]
call fcn.10001e40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x10]
push ecx
push eax
lea edx, [ebp - 0x18]
push edx
call fcn.10004700
mov byte [ebp - 4], bl
mov ecx, dword [ebp + 8]
push ecx
push eax
lea edx, [ebp - 0x14]
push edx
call fcn.100047c0
add esp, 0x18
mov byte [ebp - 4], 4
mov ecx, dword [ebp + 0xc]
push eax
call fcn.10004c80
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1000425d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x10004280
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100042a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x100042c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.10001700
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret