Function at 0x1005a305
Capabilities:
Get common file path

Disassembly:
mov eax, 0x10138c86
call fcn.1007db34
sub esp, 0x234
mov eax, dword [0x101421f0]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
xor ebx, ebx
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], ebx
call fcn.1009a5e0
mov eax, dword [0x101421f0]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
xor esi, esi
cmp dword [ebp + 8], ebx
mov byte [ebp - 4], 3
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
je 0x1005a585
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x23e]
mov word [ebp - 0x240], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x240]
push 0x103
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp dword [ebp + 0xc], 1
jne 0x1005a3be
call fcn.1005a5c8
test eax, eax
je 0x1005a3be
lea eax, [ebp - 0x240]
push 0x5c
push eax
call fcn.1007e6f5
mov edi, eax
pop ecx
cmp edi, ebx
pop ecx
je 0x1005a585
push edi
call fcn.1007e283
shl eax, 1
push eax
push ebx
push edi
call fcn.1007e1e0
push str.Syswow64
push edi
call fcn.1007e6d0
add esp, 0x18
lea eax, [ebp - 0x240]
push eax
call fcn.1007e283
test eax, eax
pop ecx
je 0x1005a585
mov dword [ebp + 0xc], ebx
call fcn.1005a5c8
test eax, eax
je 0x1005a404
push 0x14
call fcn.1007e238
pop ecx
mov dword [ebp + 0xc], eax
cmp eax, ebx
mov byte [ebp - 4], 4
je 0x1005a3fb
mov ecx, eax
call fcn.100049ca
jmp 0x1005a3fd
xor eax, eax
mov byte [ebp - 4], 3
mov dword [ebp + 0xc], eax
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
call fcn.10094f40
lea eax, [ebp - 0x20]
mov edi, 0x1017a350
push eax
lea eax, [ebp + 8]
push edi
push eax
lea ecx, [ebp - 0x18]
call fcn.10099460
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.10094e50
mov byte [ebp - 4], 3
lea ecx, [ebp + 8]
call fcn.10094cc0
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x1005a4f2
lea ecx, [ebp - 0x14]
call fcn.10094a30
push 0x5c
push dword [ebp - 0x10]
call fcn.1007e6f5
pop ecx
cmp eax, ebx
pop ecx
jne 0x1005a47f
push dword [ebp - 0x10]
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x14]
push 0x10160910
push eax
call fcn.10097c40
add esp, 0x10
jmp 0x1005a48b
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x14]
push eax
call fcn.10094e50
push ebx
push ebx
push 3
push ebx
push 3
push connect
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x1005a4c8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x38]
push eax
push dword [ebp - 0x34]
call fcn.1009abf0
push dword [ebp - 0x14]
call fcn.1007e283
pop ecx
lea esi, [esi + eax + 1]
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x18]
push eax
lea eax, [ebp - 0x28]
push edi
push eax
call fcn.10099460
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.10094e50
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
jmp 0x1005a439
mov ecx, dword [ebp + 0xc]
cmp ecx, ebx
je 0x1005a4ff
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x34]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x1005a585
cmp esi, ebx
je 0x1005a585
lea eax, [esi + 1]
mov dword [ebp + 0xc], eax
lea esi, [eax + eax]
push esi
call fcn.1007e238
mov edi, eax
pop ecx
cmp edi, ebx
je 0x1005a585
push esi
push ebx
push edi
call fcn.1007e1e0
add esp, 0xc
cmp dword [ebp + 8], ebx
jle 0x1005a587
mov eax, dword [ebp - 0x38]
push dword [eax + ebx*4]
call fcn.1007e283
pop ecx
mov ecx, dword [ebp - 0x1c]
lea esi, [ecx + eax]
lea ecx, [esi + 1]
cmp ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24], ecx
jae 0x1005a587
mov ecx, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ecx + ebx*4]
lea eax, [edi + eax*2]
push ecx
push eax
call fcn.1007e246
push 1
lea eax, [edi + esi*2]
push 0x1017a350
push eax
call fcn.1007e246
mov eax, dword [ebp - 0x24]
add esp, 0x18
inc ebx
mov dword [ebp - 0x1c], eax
cmp ebx, dword [ebp + 8]
jl 0x1005a533
jmp 0x1005a587
xor edi, edi
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.10094cc0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.10094cc0
and byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.1009a5f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.10094cc0
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret