Function at 0x437508
Capabilities:
Get common file path

Disassembly:
sub esp, 0x358
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x161]
mov byte [esp + 0x160], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x164]
mov dword [esp + 0x14], esi
push eax
mov dword [esp + 0x1c], 0x47bdb4
mov dword [esp + 0x20], 0x47bda4
mov dword [esp + 0x24], 0x47bd98
mov dword [esp + 0x28], 0x47bd88
mov dword [esp + 0x2c], 0x47bd78
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebp, dword [esp + 0x36c]
push 0x5c
push ebp
call dword [sym.imp.MSVCRT.dll__mbsrchr]
mov ebx, eax
xor edi, edi
add esp, 8
cmp ebx, edi
je 0x4376e2
mov ecx, ebx
lea edx, [esp + 0x160]
sub ecx, ebp
push ecx
push edx
push ebp
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x4376e2
push 0x47bd68
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4376c5
mov eax, dword [esp + 0x374]
mov ecx, dword [esp + 0x370]
push eax
push ecx
push ebp
mov ecx, esi
call fcn.00437410
test eax, eax
je 0x4376e2
mov edx, ebp
lea ecx, [esp + 0x28]
mov dword [esp + 0x154], edi
mov dword [esp + 0x15c], edi
mov dword [esp + 0x14c], 2
mov edi, 0x104
lea eax, [esp + 0x28]
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x43760e
mov byte [eax], cl
inc eax
dec edi
jne 0x4375ff
jmp 0x437612
test edi, edi
jne 0x437613
dec eax
lea edx, [esp + 0x28]
mov byte [eax], 0
push edx
lea eax, [esp + 0x268]
push 0x104
push eax
call fcn.0040aba0
lea ecx, [esp + 0x264]
push ecx
call dword [sym.imp.ntdll.dll__strupr]
lea edi, [esp + 0x268]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x268]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call fcn.00437810
xor edx, edx
add esp, 0xc
div dword [0x480398]
push 0x4803a4
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x480394]
mov ebp, dword [eax + ebx*4]
test ebp, ebp
mov esi, ebp
je 0x43769d
lea ecx, [esp + 0x28]
lea edx, [esi + 4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4377f1
mov esi, dword [esi]
test esi, esi
jne 0x437680
push 0x4803e0
mov ecx, 0x4803c4
call fcn.0040d230
test eax, eax
jne 0x4376ba
mov ecx, 0x4803c4
call fcn.0040d100
mov dword [eax], 0
jmp 0x4377c1
xor esi, esi
lea edi, [esp + 0x14]
mov edx, dword [edi]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4376f1
inc esi
add edi, 4
cmp esi, 5
jb 0x4376cb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x358
ret 0xc
cmp esi, 5
jae 0x4376e2
mov eax, dword [esp + 0x374]
mov ecx, dword [esp + 0x370]
push eax
push ecx
mov ecx, dword [esp + 0x18]
push ebp
call fcn.004374d0
test eax, eax
je 0x4376e2
xor edi, edi
mov edx, ebp
lea ecx, [esp + 0x28]
mov dword [esp + 0x154], edi
mov dword [esp + 0x14c], 2
mov dword [esp + 0x15c], edi
mov esi, 0x104
lea eax, [esp + 0x28]
sub edx, ecx
mov cl, byte [edx + eax]
test cl, cl
je 0x43774f
mov byte [eax], cl
inc eax
dec esi
jne 0x437740
jmp 0x437753
cmp esi, edi
jne 0x437754
dec eax
lea edx, [esp + 0x28]
mov ecx, 0x480390
push edx
mov byte [eax], 0
call fcn.0040ac00
xor edx, edx
push 0x4803a4
div dword [0x480398]
mov ebx, edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x480394]
mov ebp, dword [eax + ebx*4]
cmp ebp, edi
mov esi, ebp
je 0x4377a2
lea ecx, [esp + 0x28]
lea edx, [esi + 4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4377f1
mov esi, dword [esi]
cmp esi, edi
jne 0x437789
push 0x4803e0
mov ecx, 0x4803c4
call fcn.0040d230
cmp eax, edi
jne 0x4377bf
mov ecx, 0x4803c4
call fcn.0040d100
mov dword [eax], edi
lea edi, [eax + 4]
mov ecx, 0x4e
lea esi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x13c], 0
mov dword [eax], ebp
mov ecx, dword [0x480394]
mov dword [ecx + ebx*4], eax
mov ecx, dword [0x48039c]
inc ecx
mov dword [0x48039c], ecx
push 0x4803a4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
mov eax, 0x44c
pop ebx
add esp, 0x358
ret 0xc