Function at 0x406890
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x549e58
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x5af040]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov ebx, ecx
call fcn.0041ff22
push 0x104
call fcn.00410704
add esp, 4
mov esi, eax
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [esi - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4068e1
mov eax, dword [str.config.xml]
mov dword [ecx], eax
mov eax, dword [0x58e25c]
mov dword [ecx + 4], eax
mov eax, dword [0x58e260]
mov dword [ecx + 8], eax
lea ecx, [esp + 0x14]
push esi
call fcn.00402b10
lea ecx, [esp + 0x48]
mov dword [esp + 0x70], 0
call fcn.00420e0e
push 0
mov byte [esp + 0x74], 1
lea ecx, [esp + 0x4c]
push dword [esp + 0x18]
call fcn.00420eda
test eax, eax
je 0x406b56
lea ecx, [esp + 0x30]
call fcn.004214ec
lea ecx, [esp + 0x1c]
mov byte [esp + 0x70], 2
call fcn.00413ad1
mov dword [esp + 0x1c], vtable.CFileException.0
call fcn.00414052
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x406974
push 0x80004005
call fcn.004029d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0xffffffff
call fcn.00402a20
lea eax, [esp + 0x1c]
mov byte [esp + 0x70], 4
push eax
push 0x4000
push dword [esp + 0x1c]
lea ecx, [esp + 0x3c]
call fcn.004217e2
push 0
test eax, eax
je 0x406b0c
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x34]
push 0
push 0
call dword [eax + 0x2c]
call fcn.00414052
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4069ec
push 0x80004005
call fcn.004029d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
mov byte [esp + 0x70], 5
push eax
lea ecx, [esp + 0x34]
call fcn.00421965
lea ecx, [esp + 0x30]
call fcn.0042164f
lea eax, [esp + 0x10]
lea esi, [ebx + 0x1b4]
push eax
mov ecx, esi
call fcn.00404850
push 0
mov ecx, ebx
call fcn.0041acca
call fcn.00414052
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x406a4d
push 0x80004005
call fcn.004029d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
mov byte [esp + 0x70], 6
push eax
push esi
mov ecx, ebx
call fcn.00406cc0
mov esi, dword [esp + 0x18]
cmp eax, 1
je 0x406a82
push 0
push 0
push esi
call fcn.004143da
jmp 0x406a8c
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x17c]
add esi, 0xfffffff0
mov byte [esp + 0x70], 5
or ebx, 0xffffffff
mov eax, ebx
lea ecx, [esi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x406aad
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x70], 4
mov ecx, ebx
mov edx, dword [esp + 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406acf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [esp + 0x70], 2
mov ecx, ebx
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff0
mov dword [esp + 0x1c], vtable.CFileException.0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406af9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [esp + 0x30]
mov byte [esp + 0x70], 1
call fcn.00421506
jmp 0x406bb0
push 0x58e264
push 0x58e26c
mov ecx, ebx
call fcn.00418a50
mov byte [esp + 0x70], 2
or ecx, 0xffffffff
mov edx, dword [esp + 0x2c]
add edx, 0xfffffff0
mov dword [esp + 0x1c], vtable.CFileException.0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406b48
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [esp + 0x30]
mov byte [esp + 0x70], 1
call fcn.00421506
mov dword [ebx + 0x1a4], 0
call fcn.0041285b
mov esi, dword [eax + 8]
call fcn.0041285b
push 0x58e4f0
push 0x9e
push esi
mov edi, dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x406b9c
push eax
mov ecx, ebx
call fcn.00407790
mov ecx, ebx
mov dword [ebx + 0x1a8], 0xffffffff
call fcn.00408250
or ebx, 0xffffffff
lea ecx, [esp + 0x48]
mov byte [esp + 0x70], 0
call fcn.00420e3e
mov dword [esp + 0x70], 0xffffffff
mov edx, dword [esp + 0x14]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x406be1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret