Function at 0x406540
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44a828
mov eax, dword fs:[0]
push eax
sub esp, 0x234
mov eax, dword [0x465944]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x230], ecx
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0042c930
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x21c]
call fcn.004069b0
push str.Config
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ecx, eax
mov dword [ebp - 0x240], ecx
test ecx, ecx
je 0x4066bd
mov esi, dword [ebp - 0x21c]
cmp dword [esi - 0xc], 1
lea edi, [esi - 0xc]
jg 0x40668c
mov edx, dword [esi - 8]
lea eax, [edx + ecx]
cmp eax, dword [esi - 4]
jg 0x40668c
mov eax, dword [esi - 4]
lea edi, [eax*2 + 2]
lea eax, [esi + edx*2]
add ecx, ecx
jne 0x40661c
xor eax, eax
jmp 0x40666f
test eax, eax
jne 0x406637
call fcn.0042f502
mov dword [eax], 0x16
call fcn.0042f429
mov eax, 0x16
jmp 0x40666f
cmp edi, ecx
jb 0x40664e
push ecx
push str.Config
push eax
call fcn.0042be30
add esp, 0xc
xor eax, eax
jmp 0x40666f
push edi
push 0
push eax
call fcn.0042c930
add esp, 0xc
call fcn.0042f502
mov dword [eax], 0x22
call fcn.0042f429
mov eax, 0x22
push eax
call fcn.00407860
mov eax, dword [ebp - 0x240]
add esp, 4
add dword [esi - 8], eax
xor ecx, ecx
mov eax, dword [esi - 8]
mov word [esi + eax*2], cx
jmp 0x4066c3
push str.Config
push ecx
push esi
push dword [edi + 4]
lea ecx, [ebp - 0x21c]
call fcn.00407a30
test eax, eax
je 0x4066bd
cmp edi, dword [0x4644d8]
je 0x4066bd
push edi
call ebx
test eax, eax
jg 0x4066bd
push edi
call fcn.00425cdd
add esp, 4
mov esi, dword [ebp - 0x21c]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call edi
test eax, eax
jne 0x4066d8
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push str.Config.xml
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
call fcn.00406e60
push dword [ebp - 0x22c]
mov byte [ebp - 4], 1
call edi
test eax, eax
jne 0x406746
lea ecx, [ebp - 0x23c]
call fcn.0041ee00
push 0x44ea48
push 0xe6
push 0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 2
call fcn.0041ee60
push dword [ebp - 0x22c]
lea ecx, [ebp - 0x23c]
call fcn.0041eea0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 1
call fcn.0041ee20
push 0x44ea58
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
push eax
call fcn.00406e60
push dword [ebp - 0x220]
mov byte [ebp - 4], 3
call edi
test eax, eax
jne 0x40677b
push dword [ebp - 0x220]
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push str.MiniUI.xml
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x228]
push eax
call fcn.00406e60
push dword [ebp - 0x228]
mov byte [ebp - 4], 4
call edi
test eax, eax
jne 0x4067e9
lea ecx, [ebp - 0x23c]
call fcn.0041ee00
push 0x44ea48
push 0xe7
push 0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 5
call fcn.0041ee60
push dword [ebp - 0x228]
lea ecx, [ebp - 0x23c]
call fcn.0041eea0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 4
call fcn.0041ee20
push str.defaultskin.ui
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00406e60
push dword [ebp - 0x224]
mov byte [ebp - 4], 6
call edi
test eax, eax
jne 0x406853
lea ecx, [ebp - 0x23c]
call fcn.0041ee00
push 0x44ea48
push 0xe8
push 0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 7
call fcn.0041ee60
push dword [ebp - 0x224]
lea ecx, [ebp - 0x23c]
call fcn.0041eea0
lea ecx, [ebp - 0x23c]
call fcn.0041ee20
mov eax, dword [ebp - 0x224]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x406880
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x406880
mov eax, dword [ebp - 0x224]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
mov eax, dword [ebp - 0x228]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x4068ad
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x4068ad
mov eax, dword [ebp - 0x228]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
mov eax, dword [ebp - 0x220]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x4068da
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x4068da
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
mov eax, dword [ebp - 0x22c]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x406907
add eax, 0xfffffff4
push eax
call ebx
test eax, eax
jg 0x406907
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
lea eax, [esi - 0xc]
cmp eax, dword [0x4644d8]
je 0x406925
add esi, 0xfffffff4
push esi
call ebx
test eax, eax
jg 0x406925
push esi
call fcn.00425cdd
add esp, 4
mov eax, dword [ebp - 0x230]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042a853
mov esp, ebp
pop ebp
ret