Function at 0x402322
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 0xe
push 0x80
mov dword [ebp - 0x14], ecx
push 0
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
push esi
push 0
call ebx
push esi
push 0
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
and dword [ebp - 0x18], 0
mov esi, eax
mov eax, dword [0x406034]
sub eax, dword [ebp - 0x10]
je 0x4023ba
and dword [ebp - 4], 0
cmp dword [ebp - 0x10], 0
jbe 0x4023aa
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x16c]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
jmp 0x402392
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
mov cl, byte [ecx]
cmp cl, byte [edx + esi]
jne 0x4023aa
inc dword [ebp - 4]
inc dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
jb 0x40238f
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x10]
je 0x4023ba
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], eax
jb 0x402374
and dword [ebp - 4], 0
cmp word [esi + 4], 0
jbe 0x402499
lea eax, [esi + 6]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push 3
movzx eax, word [eax + 0xc]
push eax
push 0
call edi
push eax
push 0
mov dword [ebp - 0x20], eax
call ebx
push dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0xc]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [0x406034]
and dword [ebp - 0xc], 0
sub ecx, dword [ebp - 8]
mov dword [ebp - 0x24], ecx
je 0x402485
xor edx, edx
cmp dword [ebp - 8], edx
jbe 0x40243b
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx + 0x16c]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ecx
mov cl, byte [ecx]
cmp cl, byte [edx + eax]
jne 0x40243b
mov ecx, dword [ebp - 0x20]
inc edx
inc ecx
cmp edx, dword [ebp - 8]
mov dword [ebp - 0x20], ecx
jb 0x402427
cmp edx, dword [ebp - 8]
je 0x40244d
inc dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x24]
jb 0x402411
jmp 0x402485
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
call fcn.004022d6
test eax, eax
je 0x40250b
push dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x16c]
add eax, dword [ebp - 0xc]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
push dword [0x406544]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
movzx eax, word [esi + 4]
inc dword [ebp - 4]
add dword [ebp - 0x1c], 0xe
cmp dword [ebp - 4], eax
jb 0x4023cf
movzx ebx, word [esi + 4]
and word [esi + 4], 0
and dword [ebp - 4], 0
test ebx, ebx
jbe 0x4024df
lea edi, [esi + 6]
cmp dword [edi + 8], 0
je 0x4024d4
movzx eax, word [esi + 4]
cmp eax, dword [ebp - 4]
je 0x4024d0
imul eax, eax, 0xe
lea ecx, [esi + 6]
push 0xe
add eax, ecx
push edi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
inc word [esi + 4]
inc dword [ebp - 4]
add edi, 0xe
cmp dword [ebp - 4], ebx
jb 0x4024ad
push dword [0x406544]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x10]
mov eax, dword [eax + 0x16c]
push esi
add eax, dword [ebp - 0x18]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov al, 1
pop edi
pop esi
pop ebx
leave
ret
push dword [0x406544]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor al, al
jmp 0x402506