Function at 0x409900
Capabilities:
Get common file path

Disassembly:
sub esp, 0x800
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], bl
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x814]
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x610], bl
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x610]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x7f
lea edi, [esp + 0x611]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x818]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll__strlwr]
lea ecx, [esp + 0x10]
push ecx
call esi
lea edx, [esp + 0x614]
mov ebp, eax
push edx
call esi
add esp, 8
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x211]
mov byte [esp + 0x210], bl
mov esi, str.windir
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4099ee
cmp cl, bl
je 0x4099ea
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4099ee
add eax, 2
add esi, 2
cmp cl, bl
jne 0x4099ca
xor eax, eax
jmp 0x4099f3
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x409a1a
lea eax, [esp + 0x210]
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edi, [esp + 0x210]
lea edx, [esp + 0x10]
jmp 0x409b4d
mov esi, str.comdir
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409a45
cmp cl, bl
je 0x409a41
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409a45
add eax, 2
add esi, 2
cmp cl, bl
jne 0x409a21
xor eax, eax
jmp 0x409a4a
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x409aee
lea eax, [esp + 0x210]
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x411]
rep stosd dword es:[edi], eax
mov cx, word [esp + 0x210]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov word [esp + 0x410], cx
mov cl, byte [esp + 0x211]
mov al, 0x3a
cmp cl, al
je 0x409a9c
mov byte [esp + 0x411], al
mov cl, byte [esp + 0x412]
mov al, 0x5c
cmp cl, al
je 0x409ab0
mov byte [esp + 0x412], al
mov edi, str.Program_FilesCommon_Files
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x410]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x410]
jmp 0x409b4d
mov esi, str.winsys
mov eax, ebp
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409b19
cmp cl, bl
je 0x409b15
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409b19
add eax, 2
add esi, 2
cmp cl, bl
jne 0x409af5
xor eax, eax
jmp 0x409b1e
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x409b42
lea eax, [esp + 0x210]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0x210]
lea edx, [esp + 0x10]
jmp 0x409b4d
mov edi, dword [esp + 0x818]
lea edx, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [ecx + 1]
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, eax
mov ecx, esi
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [esp + 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret