Function at 0x507440
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e2d31
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x65eb68]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi]
call dword [eax + 0x150]
mov edi, eax
mov dword [ebp - 0x224], edi
test edi, edi
je 0x50751d
cmp dword [edi + 8], 0
je 0x50751d
mov edx, dword [esi + 0x40]
mov ecx, dword [esi + 0xb8]
lea eax, [edx + 1]
cmp eax, dword [ecx + 0x2c]
jge 0x5074fb
mov ebx, edi
lea edi, [edx + 1]
test edi, edi
js 0x5074b9
cmp edi, dword [ecx + 0x2c]
jge 0x5074b9
mov eax, dword [ecx + 0x28]
mov edi, dword [eax + edi*4]
jmp 0x5074bb
xor edi, edi
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x154]
cmp dword [edi + 0x44], eax
jl 0x5074f9
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x154]
add eax, dword [ebx + 4]
cmp dword [edi + 0x44], eax
jg 0x5074f9
mov ecx, dword [esi + 0xb8]
push edi
mov eax, dword [ecx]
call dword [eax + 0x50]
mov edx, dword [esi + 0x40]
mov ecx, dword [esi + 0xb8]
lea eax, [edx + 1]
cmp eax, dword [ecx + 0x2c]
jl 0x5074a5
mov edi, ebx
mov ecx, dword [esi + 0xc0]
call fcn.004caed0
test eax, eax
je 0x50753b
mov eax, dword [esi]
mov dword [esi + 0x90], 0
push 1
mov ecx, esi
call dword [eax + 0x60]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00599f9c
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 8]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x507556
mov eax, dword [esi]
mov dword [esi + 0x90], 0
push 0
jmp 0x507518
or dword [esi + 0x90], 1
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, 0x5c
mov word [ebp + eax*2 - 0x21c], cx
inc eax
mov dword [ebp - 0x23c], eax
lea ecx, [eax + eax]
cmp ecx, 0x20a
jae 0x5078e8
xor eax, eax
mov word [ebp + ecx - 0x21c], ax
mov ecx, 0x60f460
mov eax, dword [edi + 0x1c]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x5075df
test dx, dx
je 0x5075d3
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x5075df
add eax, 4
add ecx, 4
test dx, dx
jne 0x5075b1
mov dword [ebp - 0x234], 0
jmp 0x5075ea
sbb eax, eax
or eax, 1
mov dword [ebp - 0x234], eax
lea ecx, [ebp - 0x220]
call fcn.00404c19
lea ecx, [ebp - 0x244]
mov dword [ebp - 4], 0
call fcn.00404c19
xor ebx, ebx
mov byte [ebp - 4], 1
or ecx, 0xffffffff
cmp dword [edi + 4], ebx
jle 0x507899
lea esp, [esp]
mov eax, dword [edi]
lea ecx, [ebp - 0x21c]
push 1
push dword [ebp - 0x23c]
push ecx
push ebx
lea ecx, [ebp - 0x220]
push ecx
mov ecx, edi
call dword [eax + 0xc]
test eax, eax
je 0x507896
cmp dword [ebp - 0x234], 0
jne 0x507757
lea ecx, [edi - 0x20]
push ebx
call fcn.0053d4b0
mov edi, eax
mov dword [ebp - 0x238], edi
test edi, edi
je 0x507761
mov ecx, dword [edi + 0x2c]
sub ecx, 0x10
push ecx
call fcn.00405ebd
add esp, 4
mov ecx, dword [eax + 4]
mov dword [ebp - 0x228], ecx
or ecx, 0xffffffff
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x507699
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
cmp dword [ebp - 0x228], 0
je 0x507761
mov eax, dword [edi + 0x2c]
sub eax, 0x10
push eax
call fcn.00405ebd
add esp, 4
lea edx, [eax + 0x10]
mov dword [ebp - 0x248], edx
mov ecx, dword [ebp - 0x220]
lea edi, [edx - 0x10]
add ecx, 0xfffffff0
mov byte [ebp - 4], 2
mov dword [ebp - 0x22c], ecx
cmp edi, ecx
je 0x50773c
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp - 0x228], eax
jl 0x50772d
mov eax, dword [edi]
cmp eax, dword [ecx]
jne 0x50772d
push edi
call fcn.00405ebd
mov edx, dword [ebp - 0x228]
add esp, 4
mov dword [ebp - 0x230], eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x507722
mov eax, dword [ebp - 0x22c]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x230]
add eax, 0x10
mov dword [ebp - 0x220], eax
jmp 0x50773c
push dword [edx - 0xc]
lea ecx, [ebp - 0x220]
push edx
call fcn.00405684
mov byte [ebp - 4], 1
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x507761
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x507761
mov dword [ebp - 0x238], 0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x154]
mov ecx, dword [esi + 0x40]
add eax, ebx
push 1
inc ecx
add ecx, ebx
push ecx
mov ecx, dword [esi + 0xb8]
push 0x5ecc50
push eax
push 1
call fcn.004aed50
mov edi, eax
lea eax, [ebx + 1]
push eax
mov dword [ebp - 0x22c], eax
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.005065d0
add esp, 0xc
push dword [eax]
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.004b52f0
mov edx, dword [ebp - 0x240]
or eax, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5077da
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 8
mov ecx, edi
call fcn.004b5690
test ebx, ebx
jne 0x5077f1
cmp dword [esi + 0x40], ebx
je 0x5077f1
lea ecx, [ebx + 1]
jmp 0x5077f3
xor ecx, ecx
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x5c]
mov ecx, dword [ebp - 0x224]
mov eax, dword [ecx + 8]
mov edx, dword [eax + ebx*4]
test edx, edx
jne 0x50780f
xor eax, eax
jmp 0x507833
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x230], ecx
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x507820
sub eax, dword [ebp - 0x230]
sar eax, 1
push eax
push edx
lea ecx, [edi + 0xb0]
call fcn.00405684
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x50785e
mov eax, dword [eax + 0x24]
cmp dword [edi + 0x48], eax
je 0x50785e
push 0
mov ecx, edi
mov dword [edi + 0x48], eax
call fcn.004b5140
mov ecx, esi
call fcn.004b4460
test al, al
jns 0x507881
test ebx, ebx
jne 0x507881
mov ecx, edi
call fcn.004b4460
or eax, 0x80
mov ecx, edi
push eax
call fcn.004b5690
mov edi, dword [ebp - 0x224]
mov ebx, dword [ebp - 0x22c]
cmp ebx, dword [edi + 4]
jl 0x507620
or ecx, 0xffffffff
mov edx, dword [ebp - 0x244]
mov eax, ecx
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x5078bd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov edx, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x50751d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x50751d
call fcn.0059afae
int3