Function at 0x403060
Capabilities:
Extract resource via kernel32 functions
Terminate process

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x50
movzx ebx, word [ecx + 4]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x20], 0
test bx, bx
je 0x403560
mov eax, ecx
movzx ecx, bx
xor edx, edx
imul ecx, ecx, 0xe
add eax, 0xe
add ecx, eax
nop
add edx, dword [eax]
add eax, 0xe
cmp eax, ecx
jne 0x4030a0
mov edi, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp], edx
call edi
mov dword [ebp - 0x48], eax
test eax, eax
je 0x403697
shl ebx, 4
mov dword [esp], ebx
call edi
mov dword [ebp - 0x44], eax
test eax, eax
je 0x403697
lea eax, [ebp - 0x20]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
sub esp, 0xc
test eax, eax
js 0x403448
test esi, esi
je 0x403240
mov eax, dword [ebp - 0x30]
cmp word [eax + 4], 0
je 0x403360
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], 0
lea edi, [eax + 6]
lea esi, [esi]
mov edx, dword [esi + 8]
movzx ecx, word [edx + 2]
lea eax, [edx + 8]
mov dword [ebp - 0x2c], ecx
test cx, cx
je 0x403180
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [ebp - 0x38], ecx
lea ebx, [ecx + edx]
mov dword [ebp - 0x34], edx
xor ecx, ecx
mov dword [ebp - 0x28], eax
add eax, 0xc
cmp ebx, eax
jb 0x403398
movzx edx, word [edi + 0xc]
or dx, 0x8000
cmp word [eax - 6], dx
je 0x4033d0
mov edx, dword [ebp - 0x2c]
add ecx, 1
cmp ecx, edx
jne 0x403152
lea esi, [esi]
mov eax, dword [ebp - 0x30]
add edi, 0xe
add dword [ebp - 0x24], 1
mov ebx, dword [ebp - 0x24]
movzx eax, word [eax + 4]
cmp ebx, eax
jl 0x403130
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x403360
movzx eax, word [ebp - 0x3c]
mov dword [ebp - 0x18], 0x10000
lea ecx, [ebp - 0x18]
lea ebx, [ebp - 0x1c]
mov word [ebp - 0x14], ax
mov eax, dword [ebp - 0x20]
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
test eax, eax
mov esi, eax
js 0x403567
cmp dword [ebp - 0x1c], 6
je 0x40348b
test byte [section..data], 2
je 0x40336d
mov dword [esp + 0x10], esi
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.00401550
mov eax, dword [ebp - 0x48]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call ebx
test esi, esi
jns 0x403383
jmp 0x40346b
mov edx, dword [ebp - 0x28]
test edx, edx
je 0x403360
mov eax, dword [ebp - 0x30]
cmp word [eax + 4], 0
je 0x403360
lea ebx, [eax + 6]
xor edi, edi
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], edi
nop
mov dword [esp + 8], 3
movzx eax, word [ebx + 0xc]
mov dword [esp + 4], eax
mov edi, dword [ebp - 0x28]
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_FindResourceW]
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x403333
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_LoadResource]
sub esp, 8
test eax, eax
je 0x403333
mov edi, dword [esi + 4]
mov esi, dword [ebx + 8]
mov dword [esp], eax
mov dword [ebp - 0x2c], eax
call dword [sym.imp.kernel32.dll_LockResource]
mov edx, dword [ebp - 0x2c]
sub esp, 4
test eax, eax
je 0x403327
mov edx, dword [ebp - 0x3c]
cmp edi, esi
cmovbe esi, edi
mov edi, dword [ebp - 0x44]
movd xmm0, dword [ebx]
movd xmm2, dword [ebp - 0x40]
mov ecx, edx
add edx, 1
shl ecx, 4
mov dword [ebp - 0x3c], edx
add ecx, edi
mov edi, dword [ebp - 0x48]
movd dword [ecx], xmm0
movd xmm0, dword [ebx + 4]
movd dword [ecx + 4], xmm0
movd xmm0, esi
punpckldq xmm0, xmm2
movq qword [ecx + 8], xmm0
mov ecx, dword [ebp - 0x40]
mov dword [esp + 8], esi
mov dword [esp + 4], eax
add ecx, edi
mov dword [esp], ecx
call sub.ucrtbase.dll_memcpy
mov edx, dword [ebp - 0x2c]
add dword [ebp - 0x40], esi
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_FreeResource]
sub esp, 4
mov eax, dword [ebp - 0x30]
add ebx, 0xe
add dword [ebp - 0x24], 1
mov edi, dword [ebp - 0x24]
movzx eax, word [eax + 4]
cmp edi, eax
jl 0x403270
mov eax, dword [ebp - 0x3c]
test eax, eax
jne 0x4031a0
lea esi, cs:[esi]
nop
test byte [section..data], 2
jne 0x403579
mov eax, dword [ebp - 0x48]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x20]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test byte [section..data], 4
je 0x403180
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.00401550
jmp 0x403180
mov eax, dword [ebp - 0x28]
movzx ecx, word [esi + 0xc]
mov ebx, dword [edi + 8]
mov edx, dword [ebp - 0x34]
movzx eax, word [eax]
movd xmm1, dword [ebp - 0x40]
movd xmm0, ebx
punpckldq xmm0, xmm1
shl eax, cl
add eax, ebx
cmp edx, eax
jb 0x40361a
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x44]
add dword [ebp - 0x3c], 1
shl eax, 4
add eax, edx
mov edx, dword [edi]
movq qword [eax + 8], xmm0
mov dword [eax], edx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x40]
add eax, edx
mov edx, dword [ebp - 0x28]
movzx edx, word [edx]
shl edx, cl
mov ecx, dword [ebp - 0x38]
mov dword [esp + 8], ebx
mov dword [esp], eax
add ecx, edx
mov dword [esp + 4], ecx
call sub.ucrtbase.dll_memcpy
add dword [ebp - 0x40], ebx
jmp 0x403180
test byte [section..data], 2
jne 0x403537
mov eax, dword [ebp - 0x48]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40347d
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
lea esp, [edi - 8]
pop edi
ret
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x44]
shl edi, 4
lea edx, [edi + 6]
mov eax, esi
lea ecx, [edi + esi]
test edi, 0x10
je 0x4034c0
mov eax, dword [ebp - 0x44]
add dword [eax + 0xc], edx
add eax, 0x10
cmp eax, ecx
je 0x4034cd
lea esi, cs:[esi]
lea esi, [esi]
add dword [eax + 0xc], edx
add dword [eax + 0x1c], edx
add eax, 0x20
cmp eax, ecx
jne 0x4034c0
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov esi, dword [ebp - 0x44]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [edx + 0x10]
sub esp, 0x10
test eax, eax
mov esi, eax
js 0x403650
cmp edi, dword [ebp - 0x1c]
je 0x4035a2
test byte [section..data], 2
je 0x40336d
mov dword [esp + 0x10], esi
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.00401550
jmp 0x40321c
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.00401550
jmp 0x403455
xor edx, edx
jmp 0x4030a9
test byte [section..data], 2
je 0x403455
jmp 0x4031f4
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.00401550
jmp 0x40336d
mov eax, dword [ebp - 0x20]
mov edx, dword [eax]
mov dword [esp + 0xc], ebx
mov edi, dword [ebp - 0x40]
mov dword [esp + 8], edi
mov esi, dword [ebp - 0x48]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [edx + 0x10]
sub esp, 0x10
test eax, eax
mov esi, eax
js 0x40360b
cmp dword [ebp - 0x1c], edi
je 0x403662
test byte [section..data], 2
je 0x40336d
mov dword [esp + 0x10], esi
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.00401550
jmp 0x40321c
test byte [section..data], 2
je 0x403455
jmp 0x4035de
test byte [section..data], 4
je 0x403195
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.00401550
jmp 0x403195
test byte [section..data], 2
je 0x403455
jmp 0x40350a
mov eax, dword [ebp - 0x20]
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 esi, eax
jmp 0x40321c
test byte [section..data], 2
jne 0x4036ad
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x4036a0