Function at 0x401a80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x486448
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4a5584]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 8], ebx
jne 0x401ca5
mov eax, dword [edi + 0xc]
lea esi, [edi + 0xc]
cmp dword [eax - 0xc], ebx
je 0x401ace
mov eax, esi
call fcn.00401930
mov byte [edi + 0x1f], al
mov al, byte [edi + 0x1f]
mov ecx, dword [esi]
cmp al, 2
jne 0x401b01
cmp dword [ecx - 0xc], ebx
jne 0x401c3c
movzx edx, word [edi + 4]
mov eax, dword [0x4a83c8]
push 0x2000
push ebx
push ebx
push ebx
push edx
push eax
call dword [sym.imp.USER32.dll_LoadImageW]
mov dword [edi + 8], eax
jmp 0x401c41
cmp dword [ecx - 0xc], ebx
jne 0x401c3c
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x40], ebx
cmp al, 4
jne 0x401b92
mov eax, dword [edi + 4]
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
movzx edx, ax
push ecx
mov eax, esp
mov dword [ecx], edx
lea esi, [esp + 0x1c]
mov dword [esp + 0x18], esp
mov dword [eax], 0x4944c0
call fcn.00401220
test al, al
je 0x401b92
lea eax, [esp + 0x10]
push eax
push 0x1a
mov dword [esp + 0x18], ebx
call fcn.0042ba9e
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x10]
mov byte [esp + 0x40], 1
call fcn.00403c20
mov ecx, dword [esp + 0x18]
mov edx, dword [0x4a83c8]
mov esi, dword [eax]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esi]
mov edx, dword [ecx + 0xc]
push ebx
push eax
push esi
call edx
jmp 0x401c11
cmp byte [edi + 0x1f], 3
jne 0x401c2b
mov eax, dword [edi + 4]
push ecx
movzx eax, ax
mov ecx, esp
mov dword [esp + 0x14], esp
push ecx
mov dword [ecx], eax
mov eax, esp
lea esi, [esp + 0x1c]
mov dword [esp + 0x18], esp
mov dword [eax], 0x4944c8
call fcn.00401220
test al, al
je 0x401c2b
lea ecx, [esp + 0x10]
push ecx
push 0x1b
mov dword [esp + 0x18], ebx
call fcn.0042ba9e
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x10]
mov byte [esp + 0x40], 2
call fcn.00403c20
mov edx, dword [esp + 0x18]
mov esi, dword [eax]
mov eax, dword [0x4a83c8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x14]
push ecx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [esi]
push ebx
push eax
mov eax, dword [edx + 0xc]
push esi
call eax
mov dword [edi + 8], eax
mov byte [esp + 0x40], 0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401c29
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
xor ebx, ebx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x401c41
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x401c41
call fcn.00401cc0
mov eax, dword [edi + 8]
cmp eax, ebx
jne 0x401c61
mov dword [edi + 0x14], ebx
mov dword [edi + 0x18], ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x1c]
push ecx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
movzx ecx, word [edi + 0x1c]
mov esi, dword [esp + 0x20]
cmp cx, bx
jbe 0x401c87
mov eax, esi
movzx ebx, cx
cdq
idiv ebx
mov dword [edi + 0x14], eax
mov edx, dword [esp + 0x24]
movzx eax, cx
imul eax, dword [edi + 0x14]
mov dword [edi + 0x18], edx
cmp eax, esi
jne 0x401ca5
cmp word [esp + 0x2e], 0x20
sete cl
mov byte [edi + 0x1e], cl
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret