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

Disassembly:
push 0xffffffffffffffff
push 0x4d6d9b
mov eax, dword fs:[0]
push eax
sub esp, 0x62c
mov eax, dword [0x536f50]
xor eax, esp
mov dword [esp + 0x628], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x536f50]
xor eax, esp
push eax
lea eax, [esp + 0x640]
mov dword fs:[0], eax
mov esi, dword [esp + 0x650]
xor edi, edi
cmp esi, edi
je 0x420589
mov eax, dword [0x53ac30]
mov edx, dword [eax + 0xc]
mov ecx, 0x53ac30
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x158]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [esp + 0x648], edi
mov dword [esp + 0x18], reloc.WS2_32.dll_accept
cmp eax, edi
je 0x4202c6
cmp dword [esi + 0x15c], 8
jb 0x420216
mov eax, dword [esi + 0x148]
jmp 0x42021c
lea eax, [esi + 0x148]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.0041f6d0
add esp, 0xc
test al, al
je 0x4202c6
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0x20019
push edi
push ebp
push ecx
mov dword [esp + 0x28], edi
call ebx
mov edi, eax
test edi, edi
je 0x420278
cmp dword [esp + 0x18], reloc.WS2_32.dll_accept
jne 0x420278
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push ebp
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov edi, eax
call fcn.004d37d0
test al, al
je 0x42029b
test edi, edi
je 0x42029b
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0x20119
push 0
push ebp
push ecx
call ebx
mov edi, eax
push ebp
call fcn.0047be0d
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x4202c6
lea ecx, [esp + 0x1c]
call fcn.004018f0
mov eax, 1
jmp 0x42058b
cmp dword [esi + 0x174], 0
je 0x42038a
cmp dword [esi + 0x178], 8
jb 0x4202e4
mov eax, dword [esi + 0x164]
jmp 0x4202ea
lea eax, [esi + 0x164]
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call fcn.0041f6d0
add esp, 0xc
test al, al
je 0x42038a
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0x20019
push 0
push ebp
push ecx
mov dword [esp + 0x28], 0
call ebx
mov edi, eax
test edi, edi
je 0x42034b
cmp dword [esp + 0x18], reloc.WS2_32.dll_accept
jne 0x42034b
lea edx, [esp + 0x14]
push edx
push 0x20019
push 0
push ebp
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
mov edi, eax
call fcn.004d37d0
test al, al
je 0x42036e
test edi, edi
je 0x42036e
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0x20119
push 0
push ebp
push ecx
call ebx
mov edi, eax
push ebp
call fcn.0047be0d
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
je 0x4202b3
cmp dword [esi + 0x1e4], 0
mov edi, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ebp, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x420493
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x236]
push ecx
mov word [esp + 0x238], ax
call fcn.0047a920
add esp, 0xc
push 0
push 0
lea edx, [esp + 0x234]
push edx
push 0
call edi
cmp dword [esi + 0x1e8], 8
jb 0x4203ea
mov eax, dword [esi + 0x1d4]
jmp 0x4203f0
lea eax, [esi + 0x1d4]
push eax
lea eax, [esp + 0x230]
push eax
call ebx
lea ecx, [esp + 0x22c]
push ecx
call ebp
test eax, eax
je 0x42043e
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x648], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x420434
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x42058b
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x2e]
push edx
mov word [esp + 0x30], cx
call fcn.0047a920
add esp, 0xc
push 0
push 0x19
lea eax, [esp + 0x2c]
push eax
push 0
call edi
cmp dword [esi + 0x1e8], 8
jb 0x420476
mov eax, dword [esi + 0x1d4]
jmp 0x42047c
lea eax, [esi + 0x1d4]
push eax
lea ecx, [esp + 0x28]
push ecx
call ebx
lea edx, [esp + 0x24]
push edx
call ebp
test eax, eax
jne 0x4202b3
cmp dword [esi + 0x200], 0
je 0x4204f1
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x2e]
push ecx
mov word [esp + 0x30], ax
call fcn.0047a920
add esp, 0xc
push 0
push 0x1a
lea edx, [esp + 0x2c]
push edx
push 0
call edi
cmp dword [esi + 0x204], 8
jb 0x4204d4
mov eax, dword [esi + 0x1f0]
jmp 0x4204da
lea eax, [esi + 0x1f0]
push eax
lea eax, [esp + 0x28]
push eax
call ebx
lea ecx, [esp + 0x24]
push ecx
call ebp
test eax, eax
jne 0x4202b3
cmp dword [esi + 0x21c], 0
je 0x42055e
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x43e]
push eax
mov word [esp + 0x440], dx
call fcn.0047a920
add esp, 0xc
push 0
push 0x1c
lea ecx, [esp + 0x43c]
push ecx
push 0
call edi
cmp dword [esi + 0x220], 8
jb 0x42053b
mov esi, dword [esi + 0x20c]
jmp 0x420541
add esi, 0x20c
push esi
lea edx, [esp + 0x438]
push edx
call ebx
lea eax, [esp + 0x434]
push eax
call ebp
test eax, eax
jne 0x4202b3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x648], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x420589
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x640]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x628]
xor ecx, esp
call fcn.0047a885
add esp, 0x638
ret