Function at 0x46f020
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d12ea
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x50cc94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor edi, edi
push 0x4e0608
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
call fcn.004af97a
mov ecx, dword [ebp + 0xc]
add esp, 4
push eax
push 0x4e0608
call fcn.0042423a
mov esi, dword [ebp + 0x10]
cmp esi, edi
je 0x46f077
mov dword [ebp - 0x14], esi
jmp 0x46f089
mov eax, dword [ebp + 8]
push 3
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x14], eax
mov esi, eax
cmp esi, edi
jne 0x46f0c7
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f0b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x40]
push ecx
call fcn.00464610
lea edx, [ebp - 0x40]
push edx
push 0x46ede0
push 0x18
push esi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov esi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
cmp esi, eax
jbe 0x46f0f8
call fcn.004afaf1
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ebx
mov edi, esi
mov dword [ebp - 0x24], edi
mov esi, eax
cmp dword [ebp - 0x34], eax
jbe 0x46f10f
call fcn.004afaf1
test ebx, ebx
je 0x46f118
cmp ebx, dword [ebp - 0x40]
je 0x46f11d
call fcn.004afaf1
cmp edi, esi
je 0x46f304
test ebx, ebx
jne 0x46f22e
call fcn.004afaf1
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x46f13e
call fcn.004afaf1
test ebx, ebx
jne 0x46f235
call fcn.004afaf1
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x46f157
call fcn.004afaf1
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
push 0x18
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x46f29b
mov edx, dword [ebp - 0x14]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x46f29b
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x20], 0
test edi, edi
jne 0x46f199
lea ecx, [ebp - 0x20]
mov dword [ebp + 0x14], ecx
mov edi, ecx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [ebp - 0x14]
push esi
push edx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x46f1b6
mov dword [ecx], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x46f298
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004693f0
add esp, 8
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], 2
mov eax, dword [ecx]
cmp dword [eax - 0xc], 0
jne 0x46f24e
mov ecx, dword [ebp - 0x18]
lea esi, [ecx - 0x10]
lea edi, [eax - 0x10]
cmp esi, edi
je 0x46f274
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x46f23c
mov edx, dword [esi]
cmp edx, dword [edi]
jne 0x46f23c
push esi
call fcn.004242ab
mov dword [ebp - 0x20], eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x46f21e
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x28]
add ecx, 0x10
mov dword [edx], ecx
jmp 0x46f274
mov eax, dword [ebx]
jmp 0x46f134
mov eax, dword [ebx]
jmp 0x46f14d
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.0042423a
mov ebx, dword [ebp - 0x28]
jmp 0x46f274
mov esi, dword [ebp - 0x18]
push ecx
add esi, 0xfffffff0
mov dword [ebp - 0x20], esp
mov edi, esp
push esi
call fcn.004242ab
add eax, 0x10
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
add esp, 4
push eax
call fcn.0046ee20
add esp, 8
mov dword [ebp - 0x1c], 1
mov byte [ebp - 4], 1
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f298
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov edi, dword [ebp - 0x24]
test ebx, ebx
jne 0x46f2f8
call fcn.004afaf1
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x46f2b0
call fcn.004afaf1
test dword [edi], 0xffff0000
je 0x46f2d8
test ebx, ebx
jne 0x46f2fc
call fcn.004afaf1
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x46f2cd
call fcn.004afaf1
mov eax, dword [edi]
push eax
call fcn.004b00c5
add esp, 4
test ebx, ebx
jne 0x46f300
call fcn.004afaf1
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x46f2ed
call fcn.004afaf1
mov eax, dword [ebp - 0x30]
add edi, 4
jmp 0x46f100
mov eax, dword [ebx]
jmp 0x46f2a6
mov eax, dword [ebx]
jmp 0x46f2c3
mov eax, dword [ebx]
jmp 0x46f2e3
mov eax, dword [ebp - 0x14]
cmp dword [ebp + 0x10], eax
je 0x46f313
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 0x40]
push ecx
mov byte [ebp - 4], 0
call fcn.004647a0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46f346
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret