Function at 0x4020e9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
push ebx
mov edx, 0xb
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x4020f0
mov eax, dword [esp + 0x38]
mov dword [0x421328], eax
mov edx, 0x41f00d
lea ecx, [esp]
call fcn.00403008
call sub.KERNEL32.dll_IsDebuggerPresent
mov ebx, eax
cmp ebx, 1
jne 0x402124
jmp 0x40145e
push dword [0x420f00]
call sub.KERNEL32.dll_LoadLibraryA
mov dword [esp + 4], eax
cmp dword [esp + 4], 0
je 0x40231d
push 0xa
push 8
push dword [esp + 0xc]
call sub.KERNEL32.dll_FindResourceA
mov dword [esp + 8], eax
cmp dword [esp + 8], 0
je 0x402314
push dword [esp + 8]
push dword [esp + 8]
call sub.KERNEL32.dll_LoadResource
mov dword [esp + 0xc], eax
push dword [esp + 8]
push dword [esp + 8]
call sub.KERNEL32.dll_SizeofResource
mov dword [esp + 0x10], eax
cmp dword [esp + 0xc], 0
je 0x402198
mov ebx, dword [esp + 0x10]
and ebx, ebx
jle 0x402198
mov eax, 1
jmp 0x40219a
xor eax, eax
and eax, eax
je 0x402314
push dword [esp + 0xc]
call sub.KERNEL32.dll_LockResource
mov dword [esp + 0x14], eax
cmp dword [esp + 0x14], 0
je 0x402314
mov ebx, dword [esp + 0x10]
add ebx, 2
push ebx
call fcn.0040e2a0
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
je 0x402314
push dword [esp + 0x10]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.0040e2c0
mov ebx, dword [esp + 0x10]
add ebx, 2
push ebx
call fcn.0040e2a0
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x1c], 0
je 0x40230b
mov ebx, dword [esp + 0x10]
add ebx, 2
push ebx
push dword [esp + 0x20]
call fcn.00417507
mov ebp, 0x41f210
push ebp
push pe_nt_image_headers32
mov ebp, 0x41f200
push ebp
push dword [esp + 0x1c]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.00413410
mov ebx, eax
cmp ebx, dword [esp + 0x10]
jne 0x402302
mov eax, dword [0x421328]
push eax
push eax
push dword [esp + 0x24]
call fcn.0040e320
lea eax, [esp + 0x24]
push eax
call fcn.00416c30
push dword [esp + 0x20]
call fcn.0040d280
mov dword [esp + 0x24], eax
mov ebx, dword [esp + 0x24]
cmp ebx, 0x20
jle 0x402302
mov eax, dword [0x421328]
push eax
push eax
mov ebx, dword [esp + 0x2c]
add ebx, 0xffffffe0
push ebx
push dword [esp + 0x2c]
call fcn.0040d2b0
lea eax, [esp + 0x2c]
push eax
call fcn.00416c30
mov eax, dword [0x421328]
push eax
push eax
push dword [esp + 0x30]
call fcn.0040d280
push eax
mov eax, dword [esp + 0x34]
push eax
call fcn.00413440
inc dword [0x421328]
mov eax, dword [0x421328]
push eax
push eax
push 0x20
push dword [esp + 0x30]
call fcn.0040d210
pop edx
pop ecx
mov dword [0x421328], ecx
add ecx, dword [0x41fae0]
add edx, dword [0x41fae0]
call fcn.00416d10
je 0x402302
mov edx, dword [esp + 0x28]
push dword [0x421328]
call fcn.00416cb0
lea eax, [esp + 4]
push eax
call fcn.00416c30
push dword [esp + 0x1c]
call fcn.0040e300
push dword [esp + 0x18]
call fcn.0040e300
push dword [esp + 4]
call sub.KERNEL32.dll_FreeLibrary
push dword [esp]
mov edx, 0x41f00d
pop ecx
call fcn.00416d10
je 0x40233a
mov edx, 0x41f0da
lea ecx, [esp]
call fcn.00403008
mov edx, dword [esp]
push dword [0x421328]
call fcn.00416cb0
pop eax
add eax, dword [0x41fae0]
jmp 0x40235f
push dword [esp]
call fcn.00416d40
push dword [esp + 0x20]
call fcn.00416d40
push dword [esp + 0x28]
call fcn.00416d40
add esp, 0x2c
pop ebx
pop ebp
ret