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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x51b128
push 0x4c20b0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x527f10]
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 0x48fb10
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 0x48fbb0
mov dword [ebp - 0x1c], 0x490
jmp 0x48fd88
push edi
push eax
push 0xe
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
cmp eax, edi
jne 0x48fbcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
jmp 0x48fd88
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
je 0x48fbbf
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov dword [ebp - 0x48], esi
cmp esi, edi
je 0x48fbbf
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 0x48fc15
lea edx, [eax*8]
sub edx, eax
add ecx, dword [esi + edx*2 + 0xe]
inc eax
jmp 0x48fbf7
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov dword [ebp - 0x20], ecx
cmp ecx, edi
jne 0x48fc32
mov dword [ebp - 0x1c], 8
jmp 0x48fd88
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 0x48fd3f
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 0x48fbbf
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 0x48fbbf
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 0x48fd11
push str.ExtractIconAsFile:_special_case:_pEntry__dwBytesInRes___cbRsrc
push str.PeInfo
call fcn.0046b940
add esp, 8
mov eax, dword [esi + 8]
cmp eax, edi
jae 0x48fd1a
mov edi, eax
push edi
mov ecx, dword [ebp - 0x40]
push ecx
mov edi, dword [ebp - 0x20]
push edi
call fcn.004bbd70
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 0x48fc54
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 0x48fbbf
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 0x48fbbf
mov dword [ebp - 0x34], 1
mov dword [ebp - 4], 0xfffffffe
call fcn.0048fdb3
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