Function at 0x497c80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x686170
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x79cac4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x20], ebx
test edx, edx
je 0x497e8a
movzx esi, dx
push 0
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x497d31
push 0xa
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x497d31
push 0x10
call fcn.006116d4
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], esi
push dword [ebp - 0x14]
mov dword [esi], vtable.ModuleResource.0
push edi
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push dword [ebp - 0x14]
mov dword [esi + 8], eax
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x28]
mov dword [esi + 0xc], eax
push esi
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
call fcn.004715b0
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
jmp 0x497d3b
xor edi, edi
xor esi, esi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 0
test edi, edi
je 0x497e5e
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x497d86
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 8]
mov edx, dword [edi]
mov ecx, edi
push eax
call dword [edx + 4]
push eax
push dword [ebp - 0x18]
call fcn.0064c9d0
add esp, 0xc
mov edi, dword [ebp - 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push eax
push 1
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
js 0x497e4d
mov eax, dword [ebp - 0x14]
push 0x10
mov dword [ebp - 0x1c], eax
call dword [sym.imp.gdiplus.dll_GdipAlloc]
mov edi, eax
test edi, edi
je 0x497de2
lea ecx, [edi + 4]
mov dword [edi], vtable.Gdiplus::Image.0
push ecx
push dword [ebp - 0x1c]
mov dword [ecx], 0
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromStream]
mov dword [edi + 8], eax
jmp 0x497de4
xor edi, edi
push dword [ebp - 0x1c]
mov ecx, ebx
mov dword [ebx], 0
push edi
mov dword [ebx + 4], 0
call fcn.00499720
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x497e0d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], 2
test esi, esi
je 0x497e97
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x497e97
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x497e97
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x497e5e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [ebp - 4], 3
test esi, esi
je 0x497e8a
or edi, 0xffffffff
mov eax, edi
lock xadd dword [esi + 4], eax
jne 0x497e8a
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], edi
dec edi
jne 0x497e8a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebx], 0
mov dword [ebx + 4], 0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret