Function at 0x659810
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x16e0
call fcn.00696350
push ebx
push ebp
xor ebx, ebx
push esi
mov esi, ecx
xor eax, eax
cmp esi, ebx
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
je 0x659b6e
mov ecx, 0x82
lea edi, [esp + 0x158]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov ecx, 0x19
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
mov ecx, 0x19
lea edi, [esp + 0xf0]
rep stosd dword es:[edi], eax
mov edx, 0x64
lea ecx, [esp + 0xf0]
call fcn.00652720
xor eax, eax
mov ecx, 0x4e2
lea edi, [esp + 0x368]
rep stosd dword es:[edi], eax
push 0x20a
lea eax, [esp + 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x659b6c
lea eax, [esp + 0x158]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x6598c1
sub eax, edx
mov edx, eax
cmp edx, 1
jl 0x659b6c
cmp edx, 0x104
jg 0x659b6c
mov eax, esi
mov byte [esp + edx + 0x158], 0x5c
inc edx
lea edi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x6598f0
sub eax, edi
cmp eax, 1
jl 0x659b6c
cmp eax, 0x104
jg 0x659b6c
lea ebp, [eax + edx]
lea ecx, [ebp + 1]
cmp ecx, 0x209
ja 0x659b6c
lea edi, [esp + edx + 0x158]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edx, [esp + 0x14]
lea ecx, [esp + 0x158]
mov byte [esp + ebp + 0x158], bl
call fcn.0065eb70
lea ecx, [esp + 0xf0]
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
cmp dl, bl
jne 0x659957
sub ecx, esi
cmp eax, ecx
jb 0x659b6c
cmp eax, 0x1388
ja 0x659b6c
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x368]
push ecx
push eax
lea ecx, [esp + 0x160]
call fcn.0065eba0
test eax, eax
je 0x659b6c
mov edx, 0x64
lea ecx, [esp + 0x20]
call fcn.006521a0
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x1c]
push eax
lea edx, [esp + 0x28]
lea ecx, [esp + 0x370]
mov dword [esp + 0x18], ebx
call fcn.0065ebe0
test eax, eax
je 0x659b6c
mov eax, dword [esp + 0x10]
cmp eax, 4
jb 0x659b6c
mov edx, dword [esp + 0x18]
shr eax, 2
mov ecx, eax
xor eax, eax
cmp ecx, ebx
jbe 0x6599ef
cmp byte [edx + eax*4], 9
je 0x659a01
inc eax
cmp eax, ecx
jb 0x6599e4
xor eax, eax
cmp ecx, ebx
jbe 0x6599ff
cmp byte [edx + eax*4], bl
je 0x659a01
inc eax
cmp eax, ecx
jb 0x6599f5
xor eax, eax
mov eax, dword [edx + eax*4]
mov ecx, eax
shr ecx, 0x10
push ecx
and eax, 0xffff
push eax
push str._04x_04x
lea edx, [esp + 0x94]
push 0x64
push edx
call fcn.006976f4
xor eax, eax
mov ecx, 0x19
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
add esp, 0x14
mov edx, 0x64
lea ecx, [esp + 0x20]
call fcn.006523e0
mov al, byte [esp + 0x88]
mov dl, byte [esp + 0x8a]
mov cl, byte [esp + 0x89]
mov byte [esp + 0x30], al
mov al, byte [esp + 0x8b]
mov byte [esp + 0x32], dl
mov dl, byte [esp + 0x8d]
mov byte [esp + 0x31], cl
mov cl, byte [esp + 0x8c]
mov byte [esp + 0x33], al
mov al, byte [esp + 0x8e]
mov byte [esp + 0x35], dl
mov byte [esp + 0x34], cl
mov cl, byte [esp + 0x8f]
lea edx, [esp + 0x10]
mov byte [esp + 0x36], al
push edx
lea eax, [esp + 0x20]
mov byte [esp + 0x3b], cl
push eax
lea edx, [esp + 0x28]
lea ecx, [esp + 0x370]
mov dword [esp + 0x18], ebx
call fcn.0065ebe0
test eax, eax
je 0x659b6c
lea eax, [esp + 0xf0]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x659ad0
sub eax, edx
mov edx, dword [esp + 0x10]
cmp edx, eax
jb 0x659b6c
lea eax, [esp + 0xf0]
xor esi, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x659af1
sub eax, edi
sub edx, eax
je 0x659b62
mov edi, edi
lea eax, [esp + 0xf0]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x659b10
sub eax, edx
mov edx, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0xf4]
push ecx
add edx, esi
push edx
call fcn.00697b57
add esp, 0xc
test eax, eax
je 0x659b5d
lea eax, [esp + 0xf0]
inc esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x659b40
mov ecx, dword [esp + 0x10]
sub eax, edx
sub ecx, eax
cmp esi, ecx
jb 0x659b00
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, 1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret