Function at 0x41c218
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
xor eax, eax
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.icon
mov dword [esp + 8], 0xe
mov dword [esp + 4], 0x78
mov eax, dword [0x526d60]
mov dword [esp], eax
call fcn.0043dba5
cmp dword [ebp + 8], 0
mov esi, eax
je 0x41c310
mov eax, dword [ebp + 8]
cmp byte [eax], 0
jne 0x41c282
mov dword [esp + 4], 2
mov dword [esp], 1
call sub.msvcrt.dll_calloc
mov edi, eax
jmp 0x41c312
xor eax, eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp], 0xfde9
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0x18
mov ebx, eax
cmp eax, 1
jle 0x41c310
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov edi, eax
test eax, eax
je 0x41c310
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [ebp - 0x30], eax
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [esp], 0xfde9
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
call eax
mov edx, dword [ebp - 0x30]
sub esp, 0x18
cmp ebx, eax
je 0x41c312
mov dword [esp], edx
call sub.msvcrt.dll_free
xor edi, edi
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0xc0000000
mov dword [esp], edi
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
sub esp, 0x1c
mov ebx, eax
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test edi, edi
je 0x41c364
mov dword [ebp - 0x2c], eax
mov dword [esp], edi
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push ecx
cmp ebx, 0xffffffff
jne 0x41c38f
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], str.Unable_to_create_icon__s:__s.
mov dword [esp + 4], eax
jmp 0x41c454
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 6
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.00440072
test eax, eax
jne 0x41c3d2
call fcn.0043f53d
mov dword [esp], str.Could_not_write_icon_header:__s.
mov dword [esp + 4], eax
call fcn.0043efa9
xor esi, esi
jmp 0x41c5a6
movzx eax, word [esi + 4]
xor edi, edi
shl eax, 4
add eax, 6
jmp 0x41c3f5
xor ecx, ecx
mov dword [esp + 4], edx
inc edi
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
push edx
push edx
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
cmp di, word [esi + 4]
jae 0x41c4cd
movzx eax, di
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0xc
imul edx, dword [ebp - 0x2c], 0xe
lea eax, [esi + edx + 6]
mov dword [ebp - 0x30], edx
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00440072
mov edx, dword [ebp - 0x30]
test eax, eax
jne 0x41c45e
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], str.Could_not_write_ICONDIRENTRY__d_:__s.
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x41c3cb
mov dword [esp + 8], 3
movzx eax, word [esi + edx + 0x12]
mov dword [esp + 4], eax
mov eax, dword [0x526d60]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov dword [ebp - 0x30], eax
sub esp, 0xc
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 4
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00440072
mov edx, dword [ebp - 0x30]
test eax, eax
jne 0x41c3e0
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], str.Could_not_write_ICONDIRENTRY__d__offset:__s.
mov dword [esp + 4], eax
jmp 0x41c454
xor edi, edi
cmp di, word [esi + 4]
jae 0x41c584
movzx eax, di
mov dword [ebp - 0x2c], eax
imul eax, eax, 0xe
mov dword [esp + 8], 3
movzx eax, word [esi + eax + 0x12]
mov dword [esp + 4], eax
mov eax, dword [0x526d60]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
xor edx, edx
sub esp, 0xc
mov dword [esp + 4], eax
mov dword [ebp - 0x34], eax
mov dword [esp], edx
call dword [sym.imp.KERNEL32.DLL_LoadResource]
push ecx
push ecx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
push edx
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov dword [esp + 4], ecx
xor ecx, ecx
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
lea ecx, [ebp - 0x20]
push edx
push edx
mov dword [ebp - 0x24], eax
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x30]
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.00440072
test eax, eax
jne 0x41c57e
call fcn.0043f53d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], str.Could_not_write_icon_data__d:__s.
mov dword [esp + 4], eax
jmp 0x41c454
inc edi
jmp 0x41c4cf
cmp dword [ebp + 0xc], 0
je 0x41c591
mov esi, 1
jmp 0x41c5a6
mov eax, dword [ebp + 8]
mov dword [esp], str.Created:__s
mov dword [esp + 4], eax
call fcn.0043efa9
jmp 0x41c58a
lea eax, [ebx - 1]
cmp eax, 0xfffffffd
ja 0x41c5b8
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push eax
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret