Function at 0x497440
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57f596
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5c4104]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 0xc]
mov dword [edi + 0xa0], esi
call fcn.00406e20
mov ecx, eax
test ecx, ecx
jne 0x497488
push 0x80004005
call fcn.004071e0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x49749d
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x49749f
call edx
add eax, 0x10
mov dword [ebp + 0xc], eax
push esi
mov dword [ebp - 4], 0
lea eax, [ebp + 0xc]
push dword [ebp + 8]
push str.rid_d_type_d
push eax
call fcn.0041f560
add esp, 0xc
mov esi, esp
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], esi
mov ebx, dword [ebp + 0xc]
add ebx, 0xfffffff0
push ebx
call fcn.00405650
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 1
mov eax, dword [0x5ca52c]
test eax, eax
jne 0x49750b
push 0x6c
call fcn.0051a548
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.004c0790
mov byte [ebp - 4], 1
mov dword [0x5ca52c], eax
mov ecx, eax
mov byte [ebp - 4], 0
call fcn.004c0d30
mov dword [edi + 0x90], eax
test eax, eax
jne 0x49770e
mov eax, dword [edi + 0xa0]
cmp eax, 2
jne 0x4975a9
mov eax, dword [ebp + 8]
push 0x2000
push 0
push 0
push 0
movzx eax, ax
push eax
push dword [0x5c7874]
call dword [sym.imp.USER32.dll_LoadImageW]
push eax
push ecx
mov esi, esp
mov dword [ebp + 8], esp
push ebx
mov dword [edi + 0x90], eax
mov dword [ebp - 0x18], esi
call fcn.00405650
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 3
mov eax, dword [0x5ca52c]
test eax, eax
jne 0x497599
push 0x6c
call fcn.0051a548
add esp, 4
mov dword [ebp - 0x18], eax
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.004c0790
mov byte [ebp - 4], 3
mov dword [0x5ca52c], eax
mov ecx, eax
mov byte [ebp - 4], 0
call fcn.004c0e10
jmp 0x49770e
cmp eax, 3
jne 0x497640
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 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 - 0x14]
mov dword [eax], 0x5a2f2c
call fcn.0049e680
test al, al
je 0x497611
push dword [ebp - 0x10]
push dword [0x5c7874]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
mov edx, esi
mov ecx, eax
call fcn.00496bd0
add esp, 4
mov dword [edi + 0x90], eax
push dword [edi + 0x90]
push ecx
mov esi, esp
mov dword [ebp + 8], esp
push ebx
mov dword [ebp - 0x18], esi
call fcn.00405650
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 6
call fcn.004c0930
mov byte [ebp - 4], 5
jmp 0x4976d2
cmp eax, 4
jne 0x4976e9
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 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 - 0x14]
mov dword [eax], 0x5a2f34
call fcn.0049e680
test al, al
je 0x4976a8
push dword [ebp - 0x10]
push dword [0x5c7874]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x14]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ecx
mov edx, esi
mov ecx, eax
call fcn.00496bd0
add esp, 4
mov dword [edi + 0x90], eax
push dword [edi + 0x90]
push ecx
mov esi, esp
mov dword [ebp + 8], esp
push ebx
mov dword [ebp - 0x18], esi
call fcn.00405650
add eax, 0x10
add esp, 4
mov dword [esi], eax
mov byte [ebp - 4], 8
call fcn.004c0930
mov byte [ebp - 4], 7
mov ecx, eax
call fcn.004c0e10
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x49770e
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x49770e
cmp eax, 1
jne 0x49770e
push 0
push 0x30
push 0x30
push eax
mov eax, dword [ebp + 8]
movzx eax, ax
push eax
push dword [0x5c7874]
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 0x497730
xor ecx, ecx
jmp 0x497741
lea ecx, [ebp - 0x30]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
movzx ecx, word [ebp - 0x1e]
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 0x497790
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x49778e
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x49778e
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x497790
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