Function at 0x406ad6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x566124
call fcn.00524444
sub esp, 0x40
and dword [ebp - 0x1c], 0
push ebx
push esi
push edi
call fcn.0055c7c5
mov esi, dword [eax + 0xc]
xor eax, eax
cmp dword [ebp + 0xc], eax
push str.CFGFILES
setne al
add eax, 0x2b9
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x406d35
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x406d35
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406d35
test edi, edi
je 0x406d35
mov eax, dword [0x61d784]
mov dword [ebp - 0x20], eax
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
push 0x400
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.0054b04e
mov dword [ebp - 0x4c], 0x57aaf0
push ebx
push edi
push esi
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 2
call fcn.0054b0d6
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x4c]
push eax
call fcn.004048f2
test eax, eax
je 0x406d11
mov esi, 0x5bca30
mov edi, 0x622c98
mov eax, dword [ebp - 0x10]
cmp dword [eax - 8], ebx
je 0x406cfd
cmp byte [eax], 0x2d
jne 0x406cfd
push esi
lea ecx, [ebp - 0x10]
call fcn.0053af47
push esi
lea ecx, [ebp - 0x10]
call fcn.0053ae66
mov ecx, dword [ebp - 0x10]
cmp dword [ecx - 8], ebx
je 0x406cfd
mov eax, dword [0x61d784]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
push ecx
mov ecx, edi
call fcn.0053e2d9
test eax, eax
jne 0x406bfe
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x14]
push eax
call fcn.0053ec88
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x4c]
push eax
call fcn.004048f2
test eax, eax
je 0x406ccc
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0x2d
je 0x406c96
cmp dword [ebp + 0xc], 1
jne 0x406c66
push 0x7b
push eax
call fcn.0052540b
pop ecx
test eax, eax
pop ecx
je 0x406c66
push str.__t_n
lea ecx, [ebp - 0x10]
call fcn.0053ae66
lea eax, [ebp - 0x20]
mov ecx, edi
push eax
push dword [ebp - 0x10]
call fcn.0053e2d9
test eax, eax
je 0x406c59
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x10]
push eax
call fcn.0053ec88
push 0x5bca24
lea ecx, [ebp - 0x10]
call fcn.0053ef2b
lea eax, [ebp - 0x10]
push 0x5b85a0
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.0053ede4
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 5
call fcn.0053ef67
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 4
call fcn.0053eb4f
jmp 0x406bfe
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
call fcn.004071cb
mov ecx, eax
call fcn.0053ec88
inc dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.0053eb4f
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0053eb4f
jmp 0x406ba0
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
call fcn.004071cb
mov ecx, eax
call fcn.0053ec88
inc dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.0053eb4f
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0053eb4f
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x4c]
push eax
call fcn.004048f2
test eax, eax
jne 0x406ba0
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 1
call fcn.0054b101
and byte [ebp - 4], 0
lea ecx, [ebp - 0x10]
call fcn.0053eb4f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.0053eb4f
mov ecx, dword [ebp - 0xc]
xor eax, eax
cmp dword [ebp - 0x1c], eax
pop edi
pop esi
pop ebx
setne al
mov dword fs:[0], ecx
leave
ret