Function at 0x499b40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5dc4ed
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x65eb68]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push 0xe
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x499c28
cmp dword [ebp + 0x18], 0
je 0x499c28
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x499bf9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
test ecx, ecx
je 0x499bf9
movzx edi, word [ecx + 4]
sub edi, 1
js 0x499bf9
mov edx, dword [ebp + 0x10]
lea eax, [edi*8]
sub eax, edi
lea esi, [ecx + 7]
mov ecx, dword [ebp + 0x14]
lea esi, [esi + eax*2]
movzx eax, byte [esi - 1]
cmp eax, edx
jne 0x499bf1
movzx eax, byte [esi]
cmp eax, ecx
jne 0x499bf1
movzx eax, word [esi + 0xb]
push 0
push ecx
mov ecx, dword [ebp - 0x10]
push edx
push eax
push ebx
call fcn.00499b40
test eax, eax
jne 0x499c0f
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
sub esi, 0xe
sub edi, 1
jns 0x499bc6
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 0x14
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 3
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp + 0xc], eax
test eax, eax
je 0x499bf9
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x499bf9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov dword [ebp + 8], edi
test edi, edi
je 0x499bf9
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp word [edi + 0xe], 0x20
jne 0x499d73
lea ecx, [ebp - 0x20]
call fcn.0057124f
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [ebp - 0x20]
call fcn.00571b58
push 0x34
call fcn.005a199c
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x499d66
mov esi, edi
mov dword [ebp + 0xc], 0
mov ecx, 0xa
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
cdq
sub eax, edx
push 0
sar eax, 1
push 0
imul ecx, eax
mov dword [ebx + 8], eax
lea eax, [ebp + 0xc]
push eax
push 0
push ebx
push dword [ebp - 0x1c]
shl ecx, 2
mov dword [ebx + 0x14], ecx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edx, dword [ebp + 0xc]
mov esi, eax
test edx, edx
je 0x499d5d
test esi, esi
je 0x499d5d
mov eax, dword [ebp + 8]
mov ecx, dword [ebx + 0x14]
add eax, 0x28
test ecx, ecx
je 0x499d21
push ecx
test eax, eax
je 0x499d06
push eax
push edx
call fcn.0059d630
add esp, 0xc
jmp 0x499d21
push 0
push edx
call fcn.0059dbb0
add esp, 0xc
call fcn.005a1c31
mov dword [eax], 0x16
call fcn.005a1920
push esi
mov esi, dword [ebp - 0x10]
mov ecx, esi
call fcn.00497e40
push ebx
call fcn.005a1981
add esp, 4
lea ecx, [ebp - 0x20]
call fcn.00571361
mov ecx, esi
call fcn.0049c100
neg eax
sbb eax, eax
inc 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 0x14
push ebx
call fcn.005a1981
add esp, 4
lea ecx, [ebp - 0x20]
call fcn.00571361
jmp 0x499bf9
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0x30000
push 1
push eax
push edi
call dword [sym.imp.USER32.dll_CreateIconFromResourceEx]
push eax
mov ecx, esi
call fcn.00497e80
mov ecx, esi
call fcn.0049c100
neg eax
sbb eax, eax
inc 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 0x14