Function at 0x101d310
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x102d1f0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x1057620]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x1057620]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
push 1
call fcn.01005b1c
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x40], 0
mov eax, dword [0x10585cc]
sub eax, dword [0x10585d4]
push 0x1059c50
sub eax, 2
push 0x646
mov dword [0x10585d0], eax
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
movzx ecx, byte [0x1058668]
mov ebx, dword [esp + 0x14]
cmp ecx, 0x1ba6
mov edi, dword [0x10585d4]
push 0x646
mov dword [0x10585c4], eax
cmove ebx, edi
call fcn.01007ecc
mov ecx, dword [0x10585f0]
add esp, 4
add ecx, dword [0x1058630]
mov edx, dword [0x10585f4]
adc edx, dword [0x1058634]
mov dword [esp + 0x10], eax
cmp ecx, 0x1b4
jne 0x101d3e7
test edx, edx
jne 0x101d3e7
mov eax, dword [0x10585d0]
add eax, 0xffffffa2
add eax, ebx
sub edi, eax
sub edi, 0x10
jmp 0x101d3f9
mov eax, dword [0x10585e0]
sub eax, dword [0x10585d0]
add eax, edi
mov edi, 0xffffc53d
cmp dword [0x1058620], 0x1ba6
mov dword [0x10585d0], eax
jne 0x101d419
cmp dword [0x1058624], 0
jne 0x101d419
mov dword [0x10585d0], edi
mov ecx, edi
call fcn.0101dc20
mov edi, dword [esp + 0x10]
mov dword [0x10585cc], eax
sub eax, dword [0x10585c4]
push 0x646
push edi
sub eax, 2
push 0
mov dword [0x10585d0], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
movzx ecx, byte [0x10585c0]
mov ebx, eax
mov edx, dword [0x10585d0]
cmp ecx, edx
jb 0x101d488
push dword [0x105861c]
push dword [0x1058618]
push 0
push ebx
call fcn.0100c6c0
mov dword [0x1058618], eax
mov al, bl
mov dword [0x105861c], edx
mov edx, dword [0x10585d0]
sub al, dl
add al, 0x3d
mov byte [0x10585c0], al
movzx ecx, byte [0x1058662]
movzx eax, byte [0x105866a]
add ecx, eax
cmp ecx, 0x1b4
jne 0x101d4b9
mov eax, dword [0x10585cc]
mov ecx, ebx
add eax, 0xffffffa2
add eax, edx
sub ecx, eax
sub ecx, 0x10
mov dword [0x10585cc], ecx
jmp 0x101d4ce
movzx eax, byte [0x1058660]
sub eax, edx
mov dword [0x10585cc], 0xffffc53d
add eax, ebx
cmp byte [0x1059c50], 0
mov dword [0x10585d0], eax
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
jne 0x101d4f5
xor ecx, ecx
jmp 0x101d509
mov ecx, 0x1059c50
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101d500
sub ecx, edx
push ecx
push 0x1059c50
lea ecx, [esp + 0x20]
call fcn.010035c0
mov byte [esp + 0x40], 1
mov eax, 0x27
sub eax, dword [0x10585d4]
mov ecx, dword [0x10585d0]
sub eax, ebx
add ecx, eax
mov eax, dword [0x10585cc]
mov dword [0x10585d0], ecx
add eax, 0xffffffbc
sub ecx, dword [0x10585d4]
add eax, ecx
cmp byte [edi], 0
mov dword [0x10585cc], eax
jne 0x101d556
xor ecx, ecx
jmp 0x101d569
mov ecx, edi
lea edx, [ecx + 1]
jmp 0x101d560
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101d560
sub ecx, edx
push ecx
push edi
lea ecx, [esp + 0x20]
call fcn.01002740
mov eax, dword [0x10585cc]
mov ecx, dword [0x10585c4]
sub eax, ecx
sub eax, 2
mov dword [0x10585d0], eax
call fcn.0101dc20
mov ecx, dword [0x10585d0]
mov edi, ecx
mov eax, ecx
sub edi, ebx
sub eax, dword [0x10585cc]
sub edi, 0x3ac3
add eax, ebx
mov dword [esp + 0x10], edi
mov dword [0x10585c4], edi
mov dword [0x10585cc], eax
call fcn.0101d830
mov ecx, dword [0x10585d0]
sub edi, ebx
add edi, ecx
mov edx, 0x10586e8
jmp 0x101d5d0
xor ebx, ebx
cmp ecx, dword [0x1058630]
jne 0x101d5e2
cmp ebx, dword [0x1058634]
je 0x101d5f9
mov ecx, edi
sub ecx, eax
sub ecx, 2
sub dword [edx], eax
mov dword [0x10585d0], ecx
sbb dword [edx + 4], ebx
lea edi, [ecx + 6]
add edi, eax
sub edx, 0x10
cmp edx, 0x10585f8
jg 0x101d5d0
mov ecx, dword [esp + 0x10]
lea eax, [ecx - 0x5e]
add eax, edi
mov dword [0x10585cc], eax
cmp eax, edi
jb 0x101d639
mov al, byte [0x1058667]
imul byte [0x10585c0]
mov byte [0x1058667], al
movzx eax, byte [0x10585c0]
sub eax, edi
sub eax, 0x3ac3
mov dword [0x10585cc], eax
call fcn.0101d960
mov ecx, dword [0x10585f0]
mov edx, eax
add ecx, dword [0x1058630]
mov eax, dword [0x10585f4]
adc eax, dword [0x1058634]
mov dword [0x10585d4], edx
cmp ecx, 0x1b4
jne 0x101d685
test eax, eax
jne 0x101d685
mov ebx, dword [0x10585cc]
mov eax, 0xfffffff0
mov ecx, dword [0x10585d0]
add ebx, 0xffffffa2
add ebx, ecx
sub eax, ebx
add ecx, eax
jmp 0x101d69c
mov ebx, dword [0x10585e0]
mov ecx, 0xffffc53d
sub ebx, dword [0x10585cc]
add ebx, dword [0x10585d0]
mov dword [esp + 0x10], ecx
sub ecx, ebx
mov ebx, dword [0x10585c4]
add ecx, edi
mov dword [0x10585cc], ecx
sub ecx, dword [esp + 0x10]
add ecx, ebx
cmp dword [0x105867c], 0
mov dword [0x10585d0], ecx
ja 0x101d6f4
jb 0x101d6cf
cmp dword [0x1058678], edx
ja 0x101d6f4
mov eax, edx
mov dword [0x1058658], ecx
sub eax, ecx
mov dword [0x105865c], 0
add eax, 0xd2e1
mov edi, edx
sub edi, eax
mov dword [0x10585d0], eax
sub edi, 0x10
mov ecx, 0x21
lea esp, [esp]
movzx eax, byte [0x105866a]
cmp edi, eax
je 0x101d71d
sub byte [ecx + 0x1058660], bl
mov edi, edx
sub edi, ebx
lea edx, [ebx + 6]
sub edi, 2
add edx, edi
sub ecx, 2
cmp ecx, 3
jg 0x101d700
movzx eax, byte [0x1058661]
mov ecx, 3
mov dword [0x10585d4], edx
mov dword [esp + 0x10], eax
jmp 0x101d740
cmp edi, eax
je 0x101d764
movzx eax, byte [ecx + 0x1058660]
imul edx, eax
mov eax, edx
sub eax, edi
lea edi, [ebx + eax]
movzx eax, byte [0x1058660]
cmp edi, eax
je 0x101d76a
mov eax, dword [esp + 0x10]
inc ecx
cmp ecx, 0x26
jl 0x101d740
mov ecx, edi
mov dword [0x10585d4], edx
call fcn.0101dcb0
mov ebx, dword [0x10585d0]
cmp edi, ebx
mov edi, dword [0x10585d4]
jb 0x101d7a6
push dword [0x105861c]
push dword [0x1058618]
push 0
push edi
call fcn.0100c6c0
mov dword [0x1058618], eax
mov dword [0x105861c], edx
lea eax, [ebx + 6]
add eax, edi
mov dword [0x10585cc], eax
movzx eax, byte [0x10585c0]
sub eax, ebx
add eax, 0xd2e1
cmp dword [esp + 0x2c], 0x10
mov dword [0x10585d0], eax
jb 0x101d7d6
push dword [esp + 0x18]
call fcn.01008275
add esp, 4
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
mov dword [esp + 0x40], 0xffffffff
test esi, esi
je 0x101d80a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
test eax, eax
je 0x101d80a
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov eax, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.010076be
mov esp, ebp
pop ebp
ret 0xc