Function at 0x1021520
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, 0x1096c60
call fcn.01077478
push ecx
push ecx
mov eax, dword [0x10a6184]
push ebx
mov ebx, 0x10a6184
cmp eax, ebx
push esi
push edi
je 0x1021566
test byte [eax + 0x1c], 1
je 0x1021566
cmp byte [eax + 0x19], 5
jb 0x1021566
push dword [ebp + 8]
mov edi, 0x1004af8
push edi
push 0xd
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
jmp 0x102156b
mov edi, 0x1004af8
mov ecx, dword [0x10a7d74]
test ecx, ecx
mov dword [ebp - 0x14], ecx
jne 0x102158d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009676
mov esi, eax
mov eax, dword [0x10a6184]
jmp 0x102158f
xor esi, esi
cmp eax, ebx
je 0x10215b3
test byte [eax + 0x1c], 2
je 0x10215b3
cmp byte [eax + 0x19], 4
jb 0x10215b3
push esi
push edi
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
and dword [ebp - 0x10], 0
cmp dword [ebp - 0x14], 0
je 0x1021612
movzx eax, word [ebp + 8]
push 0x3f9
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
mov dword [ebp - 0x10], eax
jne 0x10215e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009676
mov esi, eax
jmp 0x10215e9
xor esi, esi
mov eax, dword [0x10a6184]
cmp eax, ebx
je 0x1021612
test byte [eax + 0x1c], 2
je 0x1021612
cmp byte [eax + 0x19], 4
jb 0x1021612
push esi
push edi
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
and dword [ebp + 8], 0
cmp dword [ebp - 0x10], 0
je 0x102166a
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp + 8], eax
jne 0x102163f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009676
mov esi, eax
jmp 0x1021641
xor esi, esi
mov eax, dword [0x10a6184]
cmp eax, ebx
je 0x102166a
test byte [eax + 0x1c], 2
je 0x102166a
cmp byte [eax + 0x19], 4
jb 0x102166a
push esi
push edi
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
cmp dword [ebp + 8], 0
je 0x1021777
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
test eax, eax
mov dword [ebp - 0x14], eax
jne 0x1021697
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.01009676
mov esi, eax
jmp 0x1021699
xor esi, esi
mov eax, dword [0x10a6184]
cmp eax, ebx
je 0x10216c2
test byte [eax + 0x1c], 2
je 0x10216c2
cmp byte [eax + 0x19], 4
jb 0x10216c2
push esi
push edi
push 0x11
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
cmp dword [ebp - 0x14], 0
je 0x1021777
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov eax, dword [0x10a6184]
mov esi, edi
neg esi
sbb esi, esi
and esi, 0x7fffbffb
add esi, 0x80004005
cmp eax, ebx
je 0x1021716
test byte [eax + 0x1c], 2
je 0x1021716
cmp byte [eax + 0x19], 4
jb 0x1021716
push esi
push 0x1004af8
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov eax, dword [0x10a6184]
test edi, edi
je 0x1021772
cmp eax, ebx
je 0x102173c
test byte [eax + 0x1c], 2
je 0x102173c
cmp byte [eax + 0x19], 4
jb 0x102173c
push 0x1004af8
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009ab7
push 0x10a8b2c
lea ecx, [ebp + 8]
call fcn.01020db5
push dword [ebp - 0x14]
and dword [ebp - 4], 0
push edi
lea ecx, [ebp + 8]
call fcn.010213dc
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push edi
call fcn.0101ad5a
lea ecx, [edi - 0x10]
call fcn.01009cd1
mov eax, dword [0x10a6184]
mov edi, 0x1004af8
cmp eax, ebx
je 0x10217a5
test byte [eax + 0x1c], 1
je 0x10217a5
movzx ecx, byte [eax + 0x19]
xor edx, edx
test esi, esi
setl dl
dec edx
and edx, 3
inc edx
inc edx
cmp ecx, edx
jl 0x10217a5
push esi
push edi
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01009b3f
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8