Function at 0x4b2380
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], ecx
xor ebp, ebp
mov dword [esp + 0x24], edi
test ecx, ecx
je 0x4b23ad
push 2
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x4b23b7
mov esi, dword [0x4faae0]
mov dword [esp + 0x18], esi
test esi, esi
je 0x4b254a
test edi, edi
jns 0x4b23cc
mov eax, edi
neg eax
movzx eax, ax
jmp 0x4b23fd
test edi, edi
mov dword [esp + 0x2c], ebp
mov eax, 1
mov dword [esp + 0x30], 0x4fd9c4
cmovne eax, edi
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push 0x4b2350
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov eax, dword [esp + 0x30]
cmp eax, 0x4fd9c4
je 0x4b2515
push 0xe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4b2515
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4b2515
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x4b2515
cmp dword [esp + 0x38], 0xffffffff
cmovne ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x4b245b
push 0xb
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, dword [esp + 0x14]
mov ebx, eax
lea eax, [ecx + 6]
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], eax
xor ebp, ebp
movzx eax, word [ecx + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4b2513
mov edi, dword [esp + 0x20]
mov esi, 0x100
movzx edx, byte [edi]
test edx, edx
cmove edx, esi
xor ecx, ecx
cmp edx, ebp
jle 0x4b2496
cmp ebp, ebx
setl cl
jmp 0x4b249b
cmp edx, ebx
setge cl
test ecx, ecx
mov eax, edi
cmove eax, dword [esp + 0x10]
add edi, 0xe
test ecx, ecx
mov dword [esp + 0x10], eax
cmove edx, ebp
sub dword [esp + 0x14], 1
mov ebp, edx
jne 0x4b2481
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
test eax, eax
je 0x4b2513
movzx eax, word [eax + 0xc]
push 3
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4b2513
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4b2513
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x4b2513
push 0
push 0
push 0
push 0x30000
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
call dword [sym.imp.USER32.dll_CreateIconFromResourceEx]
mov ebp, eax
jmp 0x4b2515
xor ebp, ebp
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x4b252d
test ebp, ebp
je 0x4b252d
pop edi
mov dword [ecx], esi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x4b253c
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebp, ebp
je 0x4b254e
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x1c]
test edi, edi
jle 0x4b2567
lea eax, [edi - 1]
push eax
push ebx
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
xor eax, eax
cmp edi, 0xffffffff
cmovl eax, edi
push eax
push ebx
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret