Function at 0x48ca90
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5168a0
push 0x4befe0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x522f10]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
xor edi, edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x28]
push eax
push 0x48ca60
push 0xe
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
mov eax, dword [ebp - 0x28]
cmp eax, edi
jne 0x48cb00
mov dword [ebp - 0x1c], 0x490
jmp 0x48ccd8
push edi
push eax
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
cmp eax, edi
jne 0x48cb1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
jmp 0x48ccd8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x48cb0f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov dword [ebp - 0x48], esi
cmp esi, edi
je 0x48cb0f
movzx ebx, word [esi + 4]
shl ebx, 4
add ebx, 0x16
mov ecx, ebx
xor eax, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x24], ecx
movzx edx, word [esi + 4]
cmp eax, edx
jae 0x48cb65
lea edx, [eax*8]
sub edx, eax
add ecx, dword [esi + edx*2 + 0xe]
inc eax
jmp 0x48cb47
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov dword [ebp - 0x20], ecx
cmp ecx, edi
jne 0x48cb82
mov dword [ebp - 0x1c], 8
jmp 0x48ccd8
mov edi, ecx
mov dword [ebp - 0x2c], edi
add ecx, ebx
mov dword [ebp - 0x20], ecx
movzx eax, word [esi]
mov word [edi], ax
mov dx, word [esi + 2]
mov word [edi + 2], dx
movzx eax, word [esi + 4]
mov word [edi + 4], ax
xor ebx, ebx
mov dword [ebp - 0x44], ebx
movzx edx, word [esi + 4]
cmp ebx, edx
jge 0x48cc8f
lea eax, [ebx*8]
sub eax, ebx
lea eax, [esi + eax*2 + 6]
mov edx, ebx
shl edx, 4
lea esi, [edx + edi + 6]
movzx edx, byte [eax]
mov byte [esi], dl
movzx edx, byte [eax + 1]
mov byte [esi + 1], dl
movzx edx, byte [eax + 2]
mov byte [esi + 2], dl
movzx edx, byte [eax + 3]
mov byte [esi + 3], dl
movzx edx, word [eax + 4]
mov word [esi + 4], dx
movzx edx, word [eax + 6]
mov word [esi + 6], dx
mov edx, dword [eax + 8]
mov dword [esi + 8], edx
sub ecx, edi
mov dword [esi + 0xc], ecx
xor ecx, ecx
push ecx
movzx eax, word [eax + 0xc]
push eax
push 3
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov edi, eax
test edi, edi
je 0x48cb0f
push edi
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x3c], eax
push edi
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x48cb0f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x40], eax
mov edi, dword [ebp - 0x3c]
cmp dword [esi + 8], edi
jbe 0x48cc61
push str.ExtractIconAsFile:_special_case:_pEntry__dwBytesInRes___cbRsrc
push str.PeInfo
call fcn.00468cd0
add esp, 8
mov eax, dword [esi + 8]
cmp eax, edi
jae 0x48cc6a
mov edi, eax
push edi
mov ecx, dword [ebp - 0x40]
push ecx
mov edi, dword [ebp - 0x20]
push edi
call fcn.004b8ca0
add esp, 0xc
add edi, dword [esi + 8]
mov dword [ebp - 0x20], edi
inc ebx
mov ecx, edi
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x48]
jmp 0x48cba4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
je 0x48cb0f
push 0
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x24]
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48cb0f
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0048cd03
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret