Function at 0x403490
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4479eb
mov eax, dword fs:[0]
push eax
sub esp, 0x644
mov eax, dword [0x45c5d0]
xor eax, esp
mov dword [esp + 0x640], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x45c5d0]
xor eax, esp
push eax
lea eax, [esp + 0x658]
mov dword fs:[0], eax
mov ebx, ecx
push 0x44ecdb
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], ebx
call fcn.00401fd0
mov dword [esp + 0x660], 0
cmp byte [ebx], 0
je 0x4036f2
lea esi, [esp + 0x12c]
call fcn.00407de0
lea esi, [esp + 0x33c]
call fcn.00407eb0
push 0x104
lea ecx, [esp + 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x234]
push edx
lea eax, [esp + 0x448]
push eax
call ebp
lea edi, [esp + 0x54c]
call fcn.00407f80
mov edi, dword [esp + 0x668]
test edi, edi
jle 0x403680
lea esi, [ebx + 0x104]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [esp + 0x18], edi
cmp byte [esi + 6], 1
jne 0x40366b
cmp byte [esp + 0x66c], 1
jne 0x403581
cmp byte [esi + 4], 1
jne 0x40366b
jmp 0x40358b
cmp byte [esi + 4], 1
je 0x40366b
push 0x104
lea ecx, [esp + 0x28]
push 0
push ecx
call fcn.00434d10
mov eax, dword [esi]
add esp, 0xc
test eax, eax
jne 0x4035ae
lea edx, [esp + 0x444]
jmp 0x4035fe
cmp eax, 1
jne 0x4035d0
lea eax, [esp + 0x12c]
push eax
lea ecx, [esp + 0x28]
push ecx
call ebp
lea edx, [esi - 0x104]
push edx
lea eax, [esp + 0x28]
push eax
jmp 0x403612
cmp eax, 2
jne 0x4035f2
lea ecx, [esp + 0x33c]
push ecx
lea edx, [esp + 0x28]
push edx
call ebp
lea eax, [esi - 0x104]
push eax
lea ecx, [esp + 0x28]
push ecx
jmp 0x403612
cmp eax, 3
jne 0x403614
lea edx, [esp + 0x54c]
push edx
lea eax, [esp + 0x28]
push eax
call ebp
lea ecx, [esi - 0x104]
push ecx
lea edx, [esp + 0x28]
push edx
call ebx
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x403667
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x18]
push 0x44ed50
push edx
call fcn.00402110
mov eax, dword [esp + 0x20]
add esp, 8
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.004025f0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.00409780
mov edi, dword [esp + 0x668]
mov byte [esi + 5], 0
jmp 0x40366b
mov byte [esi + 5], 1
add esi, 0x31c
sub dword [esp + 0x18], 1
jne 0x403561
mov ebx, dword [esp + 0x1c]
xor ecx, ecx
test edi, edi
jle 0x4036f2
lea eax, [ebx + 0x108]
lea esp, [esp]
cmp byte [eax + 2], 1
jne 0x4036e8
cmp byte [esp + 0x66c], 1
jne 0x4036dd
cmp byte [eax], 1
jne 0x4036e8
cmp byte [eax + 1], 0
jne 0x4036e8
mov dword [esp + 0x660], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4036d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 2
jmp 0x40371f
cmp byte [eax], 1
je 0x4036e8
cmp byte [eax + 1], 0
je 0x403749
inc ecx
add eax, 0x31c
cmp ecx, edi
jl 0x403690
mov dword [esp + 0x660], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40371d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x658]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0043164a
add esp, 0x650
ret 8
mov dword [esp + 0x660], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403774
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40371f