Function at 0x4837a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
push esi
push edi
mov ebp, edx
mov dword [esp + 0x1c], ecx
xor edi, edi
mov dword [esp + 0x24], ebp
test ecx, ecx
je 0x4837cd
push 2
push edi
push ecx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryExW]
mov esi, eax
mov dword [esp + 0x18], eax
jmp 0x4837d7
mov esi, dword [0x4e8ce0]
mov dword [esp + 0x18], esi
test esi, esi
je 0x483994
test ebp, ebp
jns 0x4837ec
mov eax, ebp
neg eax
movzx eax, ax
jmp 0x48381d
test ebp, ebp
mov dword [esp + 0x2c], edi
mov eax, 1
mov dword [esp + 0x30], 0x4ea8b8
cmovne eax, ebp
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
push 0x483770
push 0xe
push esi
call dword [sym.imp.KERNEL32.DLL_EnumResourceNamesW]
mov eax, dword [esp + 0x30]
cmp eax, 0x4ea8b8
je 0x48395f
push 0xe
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
test eax, eax
je 0x48395f
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
je 0x48395f
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov ecx, eax
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x48395f
cmp dword [esp + 0x38], 0xffffffff
cmovne ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x48387b
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], edi
mov dword [esp + 0x20], eax
xor edi, edi
movzx eax, word [ecx + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x48395d
mov ebp, dword [esp + 0x20]
mov eax, 0x100
xor esi, esi
movzx edx, byte [ebp]
test edx, edx
cmove edx, eax
movzx eax, word [ebp + 6]
mov dword [esp + 0x20], eax
cmp edx, edi
jle 0x4838c1
xor ecx, ecx
cmp edi, ebx
setl cl
jmp 0x4838d3
jge 0x4838cc
xor ecx, ecx
cmp edx, ebx
setge cl
jmp 0x4838d3
xor ecx, ecx
cmp eax, esi
setg cl
test ecx, ecx
mov eax, ebp
cmove eax, dword [esp + 0x10]
add ebp, 0xe
mov dword [esp + 0x10], eax
test ecx, ecx
mov eax, dword [esp + 0x20]
cmove eax, esi
cmove edx, edi
sub dword [esp + 0x14], 1
mov esi, eax
mov edi, edx
mov eax, 0x100
jne 0x4838a3
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x24]
test eax, eax
je 0x48395d
movzx eax, word [eax + 0xc]
push 3
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov edi, eax
test edi, edi
je 0x48395d
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_LoadResource]
test eax, eax
je 0x48395d
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov ebx, eax
test ebx, ebx
je 0x48395d
push 0
push 0
push 0
push 0x30000
push 1
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
push eax
push ebx
call dword [sym.imp.USER32.dll_CreateIconFromResourceEx]
mov edi, eax
jmp 0x48395f
xor edi, edi
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x483977
test edi, edi
je 0x483977
mov eax, edi
mov dword [ecx], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x483986
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
test edi, edi
je 0x483998
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov ebx, dword [esp + 0x1c]
test ebp, ebp
jle 0x4839b1
lea eax, [ebp - 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 ebp, 0xffffffff
cmovl eax, ebp
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