Function at 0x46d620
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56dd96
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x5b1074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [edi + 0xa0], 3
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x46d669
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46d67e
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x46d680
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
push 3
mov dword [ebp - 4], 0
lea eax, [ebp - 0x10]
push dword [ebp + 8]
push 0x58cfe8
push eax
call fcn.00418437
add esp, 0xc
mov esi, esp
mov dword [ebp - 0x14], esp
mov dword [ebp - 0x1c], esi
mov ebx, dword [ebp - 0x10]
add ebx, 0xfffffff0
mov ecx, ebx
call fcn.00408e8d
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 1
mov eax, dword [0x5db2fc]
test eax, eax
jne 0x46d6eb
push 0x6c
call fcn.0050f042
add esp, 4
mov dword [ebp - 0x1c], eax
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.00432760
mov byte [ebp - 4], 1
mov dword [0x5db2fc], eax
mov ecx, eax
mov byte [ebp - 4], 0
call fcn.00432ea0
mov dword [edi + 0x90], eax
test eax, eax
jne 0x46d8e8
mov eax, dword [edi + 0xa0]
cmp eax, 2
jne 0x46d787
mov eax, dword [ebp + 8]
push 0x2000
push 0
push 0
push 0
movzx eax, ax
push eax
push dword [0x5c879c]
call dword [sym.imp.USER32.dll_LoadImageW]
push eax
push ecx
mov esi, esp
mov dword [edi + 0x90], eax
mov ecx, ebx
mov dword [ebp + 8], esp
mov dword [ebp - 0x1c], esi
call fcn.00408e8d
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 3
mov eax, dword [0x5db2fc]
test eax, eax
jne 0x46d777
push 0x6c
call fcn.0050f042
add esp, 4
mov dword [ebp - 0x1c], eax
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.00432760
mov byte [ebp - 4], 3
mov dword [0x5db2fc], eax
mov ecx, eax
mov byte [ebp - 4], 0
call fcn.00432f70
jmp 0x46d8e8
cmp eax, 3
jne 0x46d81c
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push ecx
mov byte [ebp - 4], 5
mov ecx, esp
mov eax, dword [ebp + 8]
movzx eax, ax
push ecx
mov dword [ecx], eax
mov eax, esp
lea ecx, [ebp - 0x18]
mov dword [eax], 0x58d004
call fcn.004747e0
test al, al
je 0x46d7ef
push dword [ebp - 0x14]
push dword [0x5c879c]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
mov edx, esi
mov ecx, eax
call fcn.0046cdb0
add esp, 4
mov dword [edi + 0x90], eax
push dword [edi + 0x90]
push ecx
mov esi, esp
mov dword [ebp + 8], esp
mov ecx, ebx
mov dword [ebp - 0x1c], esi
call fcn.00408e8d
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 6
call fcn.004328e0
mov byte [ebp - 4], 5
jmp 0x46d8ac
cmp eax, 4
jne 0x46d8c3
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push ecx
mov byte [ebp - 4], 7
mov ecx, esp
mov eax, dword [ebp + 8]
movzx eax, ax
push ecx
mov dword [ecx], eax
mov eax, esp
lea ecx, [ebp - 0x18]
mov dword [eax], 0x58d00c
call fcn.004747e0
test al, al
je 0x46d884
push dword [ebp - 0x14]
push dword [0x5c879c]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x18]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
mov edx, esi
mov ecx, eax
call fcn.0046cdb0
add esp, 4
mov dword [edi + 0x90], eax
push dword [edi + 0x90]
push ecx
mov esi, esp
mov dword [ebp + 8], esp
mov ecx, ebx
mov dword [ebp - 0x1c], esi
call fcn.00408e8d
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 8
call fcn.004328e0
mov byte [ebp - 4], 7
mov ecx, eax
call fcn.00432f70
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x46d8e8
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x46d8e8
cmp eax, 1
jne 0x46d8e8
push 0
push 0x30
push 0x30
push eax
mov eax, dword [ebp + 8]
movzx eax, ax
push eax
push dword [0x5c879c]
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [edi + 0xa4], eax
mov eax, dword [edi + 0x90]
mov dword [edi + 0x98], 0
mov dword [edi + 0x9c], 0
test eax, eax
jne 0x46d90a
xor ecx, ecx
jmp 0x46d91b
lea ecx, [ebp - 0x34]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
movzx ecx, word [ebp - 0x22]
xor eax, eax
mov dword [ebp - 4], 0xffffffff
cmp ecx, 0x20
sete al
mov dword [edi + 0x8c], eax
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x46d95e
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x46d95c
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x46d95e
call edx
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 8