Function at 0x4024c0
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x561aa2
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5c1fe4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x5ca9d0]
cmp dword [eax - 0xc], 0
jne 0x402700
call fcn.00408d1f
mov ecx, eax
test ecx, ecx
je 0x402720
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x21c], esi
push ecx
mov dword [ebp - 4], 0
call fcn.00401d30
add esp, 4
test al, al
je 0x402607
call fcn.00402210
test eax, eax
je 0x402607
call fcn.00408d1f
mov ecx, eax
test ecx, ecx
je 0x40272a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov eax, str.EMDB_assets
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
test eax, 0xffff0000
jne 0x40257c
movzx eax, ax
push eax
call fcn.00406260
jmp 0x402588
push 0xc
push str.EMDB_assets
call fcn.00406c20
mov byte [ebp - 4], 2
mov eax, dword [0x5ca9cc]
cmp dword [eax - 0xc], 0
jne 0x4025db
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4025b5
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5ca9cc
call fcn.00406c20
mov eax, dword [0x5ca9cc]
lea ecx, [ebp - 0x220]
push ecx
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00406470
add esp, 0xc
push eax
mov ecx, 0x5ca9d0
mov byte [ebp - 4], 3
call fcn.004066c0
mov byte [ebp - 4], 2
jmp 0x402684
call fcn.00408d1f
mov ecx, eax
test ecx, ecx
je 0x402734
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x220], eax
mov eax, 0x5a489c
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x220]
test eax, 0xffff0000
jne 0x402645
movzx eax, ax
push eax
call fcn.00406260
jmp 0x402651
push 7
push 0x5a489c
call fcn.00406c20
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 5
push eax
call fcn.004020d0
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00406470
add esp, 0xc
push eax
mov ecx, 0x5ca9d0
mov byte [ebp - 4], 6
call fcn.004066c0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x224]
or edi, 0xffffffff
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4026a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x220]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4026c5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [0x5ca9d0]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4026e4
push 0
push dword [0x5ca9d0]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], edi
dec edi
test edi, edi
jg 0x402700
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [0x5ca9d0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00541cbd
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00406d80
push 0x80004005
call fcn.00406d80
push 0x80004005
call fcn.00406d80
int3