Function at 0x4025a0
Capabilities:
Extract resource via kernel32 functions
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x6c
mov dword [ebp - 0x2c], edx
movzx edx, word [ecx + 4]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x28], 0
test dx, dx
je 0x402b37
mov eax, ecx
movzx ecx, dx
xor edx, edx
imul ecx, ecx, 0xe
add eax, 0xe
add ecx, eax
lea esi, [esi]
add edx, dword [eax]
add eax, 0xe
cmp eax, ecx
jne 0x4025d8
mov eax, edx
call fcn.00401590
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x38]
movzx eax, word [eax + 4]
shl eax, 4
call fcn.00401590
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
sub esp, 0xc
test eax, eax
js 0x402a00
test esi, esi
je 0x4027a0
mov eax, dword [ebp - 0x38]
cmp word [eax + 4], 0
je 0x4028d0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x48], 0
mov edx, esi
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x2c], 0
lea edi, [eax + 6]
mov esi, edi
lea esi, [esi]
mov ecx, dword [edx + 8]
movzx edi, word [ecx + 2]
lea eax, [ecx + 8]
test di, di
je 0x4026b0
mov ecx, dword [edx]
mov ebx, dword [edx + 4]
mov dword [ebp - 0x34], edx
mov edx, edi
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ebx
add ebx, ecx
xor ecx, ecx
mov dword [ebp - 0x30], eax
add eax, 0xc
cmp ebx, eax
jb 0x402930
movzx edi, word [esi + 0xc]
or di, 0x8000
cmp word [eax - 6], di
je 0x402970
add ecx, 1
cmp ecx, edx
jne 0x402683
mov edx, dword [ebp - 0x34]
nop
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x2c], 1
add esi, 0xe
mov ebx, dword [ebp - 0x2c]
movzx eax, word [eax + 4]
cmp ebx, eax
jl 0x402660
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4028d0
movzx eax, word [ebp - 0x44]
mov dword [ebp - 0x20], 0x10000
lea ecx, [ebp - 0x20]
lea ebx, [ebp - 0x24]
mov word [ebp - 0x1c], ax
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 6
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x402b25
cmp dword [ebp - 0x24], 6
je 0x402a70
test byte [section..data], 2
je 0x4028dd
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.error_0x_08lX_writing_icon_stream_n
mov dword [esp + 8], str.add_module_icons_to_stream
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x4c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
test edi, edi
jns 0x402924
jmp 0x402a54
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x4028d0
mov eax, dword [ebp - 0x38]
cmp word [eax + 4], 0
je 0x4028d0
mov dword [ebp - 0x48], 0
lea edi, [eax + 6]
xor esi, esi
mov dword [ebp - 0x44], 0
lea esi, [esi]
mov dword [esp + 8], 3
movzx eax, word [edi + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_FindResourceW]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x4028a6
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LoadResource]
sub esp, 8
mov ecx, eax
test eax, eax
je 0x4028a6
mov eax, dword [ebx + 4]
mov ebx, dword [edi + 8]
mov dword [ebp - 0x34], eax
mov dword [esp], ecx
mov dword [ebp - 0x30], ecx
call dword [sym.imp.kernel32.dll_LockResource]
mov ecx, dword [ebp - 0x30]
sub esp, 4
test eax, eax
je 0x40289a
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x4c]
cmp edx, ebx
cmovbe ebx, edx
mov edx, dword [ebp - 0x44]
add dword [ebp - 0x44], 1
shl edx, 4
add edx, ecx
movzx ecx, byte [edi]
mov dword [edx + 8], ebx
mov byte [edx], cl
movzx ecx, byte [edi + 1]
mov byte [edx + 1], cl
movzx ecx, byte [edi + 2]
mov byte [edx + 2], cl
movzx ecx, byte [edi + 3]
mov byte [edx + 3], cl
movzx ecx, word [edi + 4]
mov word [edx + 4], cx
movzx ecx, word [edi + 6]
mov word [edx + 6], cx
mov ecx, dword [ebp - 0x48]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp - 0x50]
mov dword [esp + 8], ebx
add edx, ecx
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.ucrtbase.dll_memcpy
add dword [ebp - 0x48], ebx
mov ecx, dword [ebp - 0x30]
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_FreeResource]
sub esp, 4
mov eax, dword [ebp - 0x38]
add esi, 1
add edi, 0xe
movzx eax, word [eax + 4]
cmp esi, eax
jl 0x4027d0
mov eax, dword [ebp - 0x44]
test eax, eax
jne 0x4026d0
lea esi, [esi]
lea esi, [esi]
test byte [section..data], 2
jne 0x402b3e
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x4c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov eax, dword [ebp - 0x28]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp - 0x34]
test byte [section..data], 4
je 0x4026b0
mov dword [ebp - 0x30], edx
mov dword [esp + 0xc], str.file_too_small_for_icon_NE_NAMEINFO_n
mov dword [esp + 8], str.populate_module16_icons
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401540
mov edx, dword [ebp - 0x30]
jmp 0x4026b0
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
mov edi, dword [esi + 8]
movzx ecx, word [edx + 0xc]
movzx eax, word [eax]
shl eax, cl
add eax, edi
cmp dword [ebp - 0x3c], eax
jb 0x402bdf
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x4c]
mov eax, edx
add edx, 1
shl eax, 4
mov dword [ebp - 0x44], edx
mov edx, dword [ebp - 0x30]
add eax, ebx
movzx ebx, byte [esi]
mov dword [eax + 8], edi
mov byte [eax], bl
movzx ebx, byte [esi + 1]
mov byte [eax + 1], bl
movzx ebx, byte [esi + 2]
mov byte [eax + 2], bl
movzx ebx, byte [esi + 3]
mov byte [eax + 3], bl
movzx ebx, word [esi + 4]
mov word [eax + 4], bx
movzx ebx, word [esi + 6]
mov word [eax + 6], bx
mov ebx, dword [ebp - 0x48]
mov dword [eax + 0xc], ebx
mov eax, dword [ebp - 0x50]
add eax, ebx
movzx ebx, word [edx]
mov edx, dword [ebp - 0x40]
mov dword [esp + 8], edi
mov dword [esp], eax
shl ebx, cl
add edx, ebx
mov dword [esp + 4], edx
call sub.ucrtbase.dll_memcpy
add dword [ebp - 0x48], edi
jmp 0x4026ab
test byte [section..data], 2
jne 0x402afc
mov eax, dword [ebp - 0x50]
mov dword [esp + 4], 0
mov esi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x30]
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x4c]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x402a66
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x4c]
shl esi, 4
mov eax, edi
lea ecx, [esi + 6]
lea edx, [esi + edi]
lea esi, [esi]
add dword [eax + 0xc], ecx
add eax, 0x10
cmp eax, edx
jne 0x402a88
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov edi, dword [ebp - 0x4c]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [edx + 0x10]
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x402c15
cmp esi, dword [ebp - 0x24]
je 0x402b67
test byte [section..data], 2
je 0x4028dd
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.error_0x_08lX_writing_icon_dir_entries_to_stream_n
mov dword [esp + 8], str.add_module_icons_to_stream
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x40274c
mov dword [esp + 0xc], str.error_creating_icon_stream_n
mov dword [esp + 8], str.add_module_icons_to_stream
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x402a0d
test byte [section..data], 2
je 0x402a0d
jmp 0x402724
xor edx, edx
jmp 0x4025e1
mov dword [esp + 0xc], str.no_valid_icon_entries_n
mov dword [esp + 8], str.add_module_icons_to_stream
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x4028dd
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov esi, dword [ebp - 0x48]
mov dword [esp + 8], esi
mov edi, dword [ebp - 0x50]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [edx + 0x10]
sub esp, 0x10
mov edi, eax
test eax, eax
js 0x402bd0
cmp dword [ebp - 0x24], esi
je 0x402c27
test byte [section..data], 2
je 0x4028dd
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.error_0x_08lX_writing_icon_images_to_stream_n
mov dword [esp + 8], str.add_module_icons_to_stream
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401540
jmp 0x40274c
test byte [section..data], 2
je 0x402a0d
jmp 0x402ba3
test byte [section..data], 4
je 0x4026c5
mov dword [esp + 0xc], str.file_too_small_for_icon_contents_n
mov dword [esp + 8], str.populate_module16_icons
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401540
jmp 0x4026c5
test byte [section..data], 2
je 0x402a0d
jmp 0x402acf
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
mov edi, eax
jmp 0x40274c