Function at 0x4e35f0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x1c
push ebx
push ebp
mov ebp, dword [esp + 0x28]
xor ebx, ebx
push esi
push edi
test ebp, ebp
je 0x4e3613
push 2
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x4e361d
mov esi, dword [0x5276ac]
mov dword [esp + 0x18], esi
mov edi, dword [esp + 0x34]
test esi, esi
je 0x4e37cf
mov ebp, dword [0x62271c]
test edi, edi
jns 0x4e363c
mov eax, edi
neg eax
movzx ecx, ax
jmp 0x4e3677
test edi, edi
mov dword [esp + 0x24], ebx
mov eax, 1
cmovne eax, edi
mov dword [esp + 0x20], eax
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp*4]
add eax, 0x2184
mov dword [esp + 0x28], eax
lea eax, [esp + 0x20]
push eax
push 0x4e5400
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov ecx, dword [esp + 0x28]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ebp*4]
add eax, 0x2184
cmp ecx, eax
je 0x4e37a4
push 0xe
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4e37a4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4e37a4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x4e37a4
cmp dword [esp + 0x38], 0xffffffff
mov ebx, dword [esp + 0x3c]
cmovne ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x4e36e4
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], 0
mov dword [esp + 0x1c], eax
xor ebp, ebp
movzx eax, word [ecx + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4e37a2
mov edi, dword [esp + 0x1c]
mov esi, 0x100
nop
movzx edx, byte [edi]
test edx, edx
cmove edx, esi
xor ecx, ecx
cmp edx, ebp
jle 0x4e3725
cmp ebp, ebx
setl cl
jmp 0x4e372a
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 0x4e3710
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
test eax, eax
je 0x4e37a2
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 0x4e37a2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4e37a2
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
test ebp, ebp
je 0x4e37a2
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 ebx, eax
jmp 0x4e37a4
xor ebx, ebx
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4e37bc
test ebx, ebx
je 0x4e37bc
mov dword [eax], esi
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x1c
ret
mov ebp, dword [esp + 0x30]
test ebp, ebp
je 0x4e37cb
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test ebx, ebx
jne 0x4e37b2
test edi, edi
jle 0x4e37e8
lea eax, [edi - 1]
push eax
push ebp
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
xor eax, eax
cmp edi, 0xffffffff
cmovl eax, edi
push eax
push ebp
push 0
call dword [sym.imp.SHELL32.dll_ExtractIconW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret