Function at 0x402130
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x42f4a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0x114]
push 2
push 0
push eax
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
mov dword [esp + 0x10], edi
jne 0x4021bf
push 0x10
push 0x431af8
push 0x431ab8
mov ecx, esi
call fcn.00424c96
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402417
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
mov eax, dword [esi + 0x11c]
push 0xe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
jne 0x402217
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402417
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
push ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
test ebp, ebp
jne 0x40226b
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402416
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop ebp
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x402226
mov ecx, dword [eax]
mov ax, word [eax + 4]
push ebx
movzx ebx, ax
imul ebx, ebx, 0xe
push ebx
mov dword [esp + 0x28], ecx
mov word [esp + 0x2c], ax
mov dword [esp + 0x18], ebx
call fcn.004228f1
mov ecx, ebx
mov edx, ecx
shr ecx, 2
add esi, 6
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
push ebp
mov dword [esp + 0x14], eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeResource]
movzx eax, word [esp + 0x28]
xor ebp, ebp
test eax, eax
jle 0x40236a
mov esi, dword [esp + 0x10]
add esi, 0xc
movzx eax, word [esi]
mov edi, dword [esp + 0x18]
push 3
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x40242a
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40242a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x402448
mov ecx, dword [esp + 0x3c]
push 0
lea edi, [ebp + 1]
push ecx
mov word [esi], di
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov edx, dword [esi - 4]
push edx
mov ebx, eax
mov eax, dword [esp + 0x20]
push eax
push 0x804
movzx ecx, di
push ecx
push 3
push ebx
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
movzx eax, word [esp + 0x28]
inc ebp
add esi, 0xe
cmp ebp, eax
jl 0x4022d1
mov ebx, dword [esp + 0x14]
lea ebp, [ebx + 6]
push ebp
call fcn.004228f1
mov esi, dword [esp + 0x14]
mov ebx, eax
mov ecx, ebp
mov edx, ecx
shr ecx, 2
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov ecx, edx
mov dx, word [esp + 0x2c]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x28]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [esp + 0x18]
mov word [eax + 4], dx
mov eax, ecx
shr ecx, 2
lea edi, [ebx + 6]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x3c]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
push ebp
push ebx
push 0x804
push 2
mov esi, eax
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004228f6
push ebx
call fcn.004228f6
lea eax, [edi - 0x10]
add esp, 8
mov dword [esp + 0x34], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x402415
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop ebx
pop ebp
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret 4
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40240b
lea ecx, [esp + 0x3c]
call fcn.00401470
mov ecx, dword [esp + 0x2c]
pop ebx
pop ebp
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret 4