Function at 0x49a210
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54e504
mov eax, dword fs:[0]
push eax
sub esp, 0x248
push ebx
push esi
push edi
mov eax, dword [0x8870bc]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x10], 0x72a82c
mov bl, byte [ebp + 0xc]
or edi, 0xffffffff
mov dword [ebp - 4], 0
test bl, bl
jne 0x49a2fa
lea eax, [ebp - 0x24]
push eax
call fcn.0049b710
add esp, 4
push eax
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 1
call fcn.00452800
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
push ecx
mov ecx, eax
call fcn.00453a10
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 3
call fcn.00403cd0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
test eax, eax
je 0x49a2b3
cmp eax, edi
je 0x49a2c2
mov eax, dword [ebp - 0x20]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a2c2
push 4
push 2
push dword [ebp - 0x20]
call fcn.004016c0
add esp, 0xc
lea ecx, [ebp - 0x38]
call fcn.00452b30
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
test eax, eax
je 0x49a2eb
cmp eax, 0xffffffff
je 0x49a2fa
mov eax, dword [ebp - 0x24]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a2fa
push 4
push 2
push dword [ebp - 0x24]
call fcn.004016c0
add esp, 0xc
lea eax, [ebp - 0x244]
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], eax
mov dword [ebp - 0x254], 0x104
push 0x104
push eax
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, eax
cmp esi, 0x104
jbe 0x49a35f
cmp esi, dword [ebp - 0x254]
lea ecx, [ebp - 0x254]
mov edx, esi
cmovl edx, dword [ebp - 0x254]
push edx
push esi
call fcn.004594c0
push esi
push dword [ebp - 0x24c]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov esi, eax
push esi
push dword [ebp - 0x24c]
lea eax, [ebp - 0x28]
push eax
call fcn.00457730
mov eax, dword [ebp - 0x24c]
lea ecx, [ebp - 0x244]
add esp, 0xc
cmp eax, ecx
je 0x49a38b
push eax
call fcn.005260ee
add esp, 4
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x10]
call fcn.00403cd0
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 0
mov ecx, dword [eax]
mov eax, dword [ebp - 0x28]
test ecx, ecx
je 0x49a3c0
cmp ecx, 0xffffffff
je 0x49a3cd
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne cl
test cl, cl
jne 0x49a3cd
push 4
push 2
push eax
call fcn.004016c0
add esp, 0xc
test bl, bl
jne 0x49a4ef
lea eax, [ebp - 0x2c]
push str.PATH
push eax
call fcn.00418f70
add esp, 8
mov eax, dword [eax]
mov byte [ebp - 4], 6
mov edx, dword [eax + 0xc]
add edx, eax
je 0x49a403
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49a3f8
sub ecx, esi
jmp 0x49a405
xor ecx, ecx
push ecx
push edx
call fcn.00406bb0
add esp, 8
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 8
mov eax, dword [eax]
test eax, eax
je 0x49a437
cmp eax, 0xffffffff
je 0x49a446
mov eax, dword [ebp - 0x2c]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a446
push 4
push 1
push dword [ebp - 0x2c]
call fcn.004016c0
add esp, 0xc
push 1
push 1
push ecx
mov eax, esp
mov ecx, 0x3b
mov word [eax], cx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0040a980
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 9
call fcn.0049a0d0
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 0xa
mov eax, dword [eax]
test eax, eax
je 0x49a493
cmp eax, 0xffffffff
je 0x49a4bb
mov eax, dword [ebp - 0x18]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a4bb
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
mov eax, dword [esi + 0xc]
add eax, 4
lea eax, [esi + eax*4]
push eax
mov eax, dword [esi + 8]
add eax, 4
lea eax, [esi + eax*4]
push eax
call fcn.00407b50
push esi
call fcn.0041fb10
add esp, 4
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 0
mov eax, dword [eax]
test eax, eax
je 0x49a4e0
cmp eax, 0xffffffff
je 0x49a4ef
mov eax, dword [ebp - 0x1c]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a4ef
push 4
push 2
push dword [ebp - 0x1c]
call fcn.004016c0
add esp, 0xc
push 0xffffffffffffffff
push dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
call fcn.00406d40
add esp, 0xc
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [eax], 0x6f6ba0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 4], 0
mov eax, dword [eax]
test eax, eax
je 0x49a533
cmp eax, 0xffffffff
je 0x49a542
mov eax, dword [ebp - 0x30]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a542
push 4
push 2
push dword [ebp - 0x30]
call fcn.004016c0
add esp, 0xc
push str..dll
push 4
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xc
call fcn.00404070
mov eax, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
sub ecx, edx
test ecx, ecx
jle 0x49a626
lea ebx, [esi + 0x5c]
nop dword [eax]
lea ecx, [edx + esi]
mov ecx, dword [eax + ecx*4 + 0x10]
mov dword [ebp + 0xc], ecx
mov eax, dword [ecx]
test eax, eax
je 0x49a58e
cmp eax, 0xffffffff
je 0x49a58e
mov eax, 1
lock xadd dword [ecx], eax
push 1
push ecx
mov eax, esp
mov byte [ebp - 4], 0xd
lea ecx, [ebp + 0xc]
mov word [eax], bx
call fcn.004061f0
test al, al
jne 0x49a5b4
push ecx
mov eax, esp
lea ecx, [ebp + 0xc]
mov word [eax], bx
call fcn.00403c60
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 0xc]
call fcn.00403e30
lea ecx, [ebp + 0xc]
call fcn.0040bc30
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test ebx, ebx
jne 0x49a672
mov byte [ebp - 4], 0xc
test eax, eax
je 0x49a5fe
cmp eax, 0xffffffff
je 0x49a60d
mov eax, dword [ebp + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a60d
push 4
push 2
push dword [ebp + 0xc]
call fcn.004016c0
add esp, 0xc
mov eax, dword [ebp - 0x10]
inc esi
mov ebx, 0x5c
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
sub ecx, edx
cmp esi, ecx
jl 0x49a570
xor ebx, ebx
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
test eax, eax
je 0x49a647
cmp eax, 0xffffffff
je 0x49a656
mov eax, dword [ebp - 0x14]
lock xadd dword [eax], edi
cmp edi, 1
setne al
test al, al
jne 0x49a656
push 4
push 2
push dword [ebp - 0x14]
call fcn.004016c0
add esp, 0xc
lea ecx, [ebp - 0x10]
call fcn.00403320
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x49a68e
cmp eax, 0xffffffff
je 0x49a628
mov eax, dword [ebp + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
setne al
test al, al
jne 0x49a628
push 4
push 2
push dword [ebp + 0xc]
call fcn.004016c0
add esp, 0xc
jmp 0x49a628