Function at 0x406508
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x406511
mov eax, dword [ebp - 4]
add esp, 0xfffffa70
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 0x2349
push 0x68
push edi
call sub.KERNEL32.DLL_FindResourceA
mov esi, eax
test esi, esi
jne 0x406555
mov eax, dword [ebp + 0x14]
push eax
call fcn.00406364
pop ecx
test eax, eax
jne 0x4065bc
xor eax, eax
jmp 0x406897
push esi
push edi
call sub.KERNEL32.DLL_LoadResource
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40657f
push 0x10
push 0x4ceb88
push 0x4ceb6f
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x406897
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_LockResource
mov dword [0x44916c], eax
cmp dword [0x44916c], 0
jne 0x4065b0
push 0x10
push 0x4ceba7
push str.Cant_load_dll_from_Res_
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x406897
push esi
push edi
call sub.KERNEL32.DLL_SizeofResource
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
push 0x2450
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx]
sub eax, 0x2450
add eax, dword [0x44916c]
push eax
push ebx
call fcn.00408598
add esp, 0xc
call sub.KERNEL32.DLL_GetTickCount
mov ecx, 0x1ff
xor edx, edx
div ecx
mov dword [0x4f11a0], edx
mov esi, 0x4ceb4f
lea edi, [ebp - 0x2490]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
push 0x2cc
lea eax, [ebp - 0x2490]
push eax
push 0x64
lea edx, [ebx + 0x120]
push edx
call fcn.00402430
add esp, 0x10
xor esi, esi
push 0x2450
push ebx
lea eax, [ebp - 0x2470]
push eax
call fcn.00408598
add esp, 0xc
push 0x2450
lea edx, [ebp - 0x2470]
push edx
push ebx
call fcn.00408598
add esp, 0xc
cmp byte [ebx + 0x368], 1
jne 0x40666a
lea ecx, [ebp - 0x2594]
push ecx
push esi
push 0x4f0fa0
call fcn.00403e70
add esp, 0xc
jmp 0x40668d
lea eax, [ebp - 0x2594]
push eax
mov edx, dword [ebx + 0x358]
push edx
mov ecx, dword [ebx + 0x35c]
push ecx
push esi
push 0x4f0fa0
call fcn.00403e1c
add esp, 0x14
test eax, eax
je 0x40669f
push ebx
call fcn.004064b4
pop ecx
xor eax, eax
jmp 0x406897
cmp byte [ebx + 0x368], 3
jne 0x4066dd
lea edx, [ebp - 0x2594]
push edx
mov ecx, dword [ebx + 0x360]
push ecx
mov eax, dword [ebx + 0x364]
push eax
push esi
push 0x4f0fa0
call fcn.00403dc8
add esp, 0x14
test eax, eax
je 0x4066dd
push ebx
call fcn.004064b4
pop ecx
xor eax, eax
jmp 0x406897
lea edx, [ebp - 0x2594]
lea ecx, [ebx + 0x110]
push edx
push 0x10
push ecx
call fcn.004023b4
add esp, 0xc
test eax, eax
jne 0x406700
xor eax, eax
jmp 0x406897
lea edx, [ebp - 0x2594]
push edx
push 0x110
push ebx
call fcn.004023b4
add esp, 0xc
test eax, eax
jne 0x406720
xor eax, eax
jmp 0x406897
lea edx, [ebx + 0x3ec]
push edx
push 0x110
push ebx
call fcn.00402554
add esp, 0xc
mov ecx, dword [ebx + 0x110]
push ecx
push 0x4cebad
lea eax, [ebp - 0x10]
push eax
call sub.USER32.DLL_wsprintfA
add esp, 0xc
mov edx, dword [ebx + 0x114]
push edx
push 0x4cebb0
lea ecx, [ebp - 0x1c]
push ecx
call sub.USER32.DLL_wsprintfA
add esp, 0xc
lea eax, [ebp - 0x2594]
lea edx, [ebp - 0x1c]
lea ecx, [ebp - 0x10]
push eax
push 0
push edx
push ecx
xor eax, eax
xor edx, edx
mov al, byte [ebx + 0x119]
xor ecx, ecx
push eax
mov dl, byte [ebx + 0x11a]
push edx
mov cl, byte [ebx + 1]
push ecx
call fcn.00404870
add esp, 0x1c
test eax, eax
jne 0x4067a0
inc esi
jmp 0x406635
cmp byte [ebx + 0x31], 0
je 0x4067c0
lea eax, [ebp - 0x2594]
push eax
push ebx
call fcn.00401430
add esp, 8
test eax, eax
jne 0x4067c0
inc esi
jmp 0x406635
cmp byte [ebx + 0x33], 0
je 0x4067e0
lea edx, [ebp - 0x2594]
push edx
push ebx
call fcn.0040149c
add esp, 8
test eax, eax
jne 0x4067e0
inc esi
jmp 0x406635
cmp byte [ebx + 0x32], 0
je 0x406800
lea ecx, [ebp - 0x2594]
push ecx
push ebx
call fcn.00401394
add esp, 8
test eax, eax
jne 0x406800
inc esi
jmp 0x406635
lea eax, [ebp - 0x2594]
lea edx, [ebp - 0x1c]
push eax
push edx
lea ecx, [ebp - 0x10]
lea eax, [ebp - 0x1d]
push ecx
push 0
push eax
push 0x4f0fa0
call fcn.00403998
add esp, 0x18
test eax, eax
jne 0x406851
lea edx, [ebp - 0x2594]
push edx
mov ecx, dword [ebp + 0x10]
push ecx
call sub.KERNEL32.DLL_lstrcpyA
cmp byte [ebx + 0x33], 0
je 0x40684a
lea eax, [ebp - 0x2594]
push eax
push ebx
call dword [0x4f11bc]
mov eax, 1
jmp 0x406897
inc esi
jmp 0x406635
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret