Function at 0x40b640
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov ecx, 0x4471f8
push 0
call fcn.004104b6
mov edi, eax
mov dword [ebp - 8], 1
test edi, edi
je 0x40b7e6
mov eax, dword [ebp + 8]
shr eax, 4
mov dword [ebp - 0x10], eax
lea ecx, [eax + 1]
movzx eax, cx
mov dword [ebp - 0xc], eax
nop dword [eax + eax]
push 0
push eax
push 6
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov ebx, eax
test ebx, ebx
je 0x40b6dc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40b6dc
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40b6dc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, dword [ebp + 8]
mov ecx, ebx
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x40b6d2
cmp esi, edx
jae 0x40b6dc
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x40b6c0
cmp esi, edx
jae 0x40b6dc
cmp word [esi], 0
jne 0x40b6fd
mov ebx, dword [ebp - 8]
mov ecx, 0x4471f8
push ebx
call fcn.004104b6
mov edi, eax
inc ebx
mov dword [ebp - 8], ebx
test edi, edi
je 0x40b7e6
mov eax, dword [ebp - 0xc]
jmp 0x40b680
test edi, edi
je 0x40b7e6
mov eax, dword [ebp - 0x10]
inc eax
push 6
movzx eax, ax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 8], eax
test eax, eax
je 0x40b7e6
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40b7e6
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x40b7e6
push dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and ebx, 0xf
jbe 0x40b76a
cmp esi, ecx
jae 0x40b7e6
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ebx, 1
jne 0x40b754
cmp esi, ecx
jae 0x40b7e6
movzx eax, word [esi]
test ax, ax
je 0x40b7e6
mov edx, dword [ebp - 4]
mov edi, eax
mov ebx, eax
mov ecx, 1
mov edx, dword [edx]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, edi
or ecx, eax
jge 0x40b7a0
mov ebx, dword [ebp - 4]
mov ecx, ebx
push edi
call fcn.0040bb10
mov edx, dword [ebx]
movzx ebx, word [esi]
movzx ecx, bx
lea eax, [esi + 2]
push ecx
push eax
push edi
push edx
call fcn.0041c976
add esp, 0x10
cmp eax, 0x50
ja case.0x40b7be.1
movzx eax, byte [eax + 0x40b820]
jmp dword [eax*4 + 0x40b810]
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
cmp edi, dword [eax - 8]
jg case.0x40b7be.20
mov dword [eax - 0xc], edi
mov eax, dword [ecx]
xor ecx, ecx
mov word [eax + edi*2], cx
lea eax, [ecx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x8007000e
call fcn.0040f780
push 0x80070057
call fcn.0040f780
push 0x80004005
call fcn.0040f780
nop
lds esi, [edi - 0x480effc0]
inc eax
add bl, bh
mov bh, 0x40
add byte [0x40b8], al
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ecx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [edx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [ebx]
add eax, dword [eax]
int3