Function at 0x413ce0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x30
push ebx
push esi
push edi
call fcn.004d3817
mov ecx, dword [esp + 0x40]
mov eax, dword [eax + 8]
and ecx, 0xffff
push 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
call fcn.004d3817
mov eax, dword [eax + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push ebx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test edi, edi
mov dword [esp + 0x30], esi
je 0x413d69
test ebx, ebx
je 0x413d69
test esi, esi
je 0x413d69
xor eax, eax
mov ax, word [esi + 0x20]
test eax, eax
mov dword [esp + 0xc], eax
jne 0x413d49
mov dword [esp + 0xc], pe_nt_image_headers32
mov edx, dword [esi]
add edx, 0x400
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x34], eax
jne 0x413d72
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esi]
mov edi, eax
add ecx, 0x400
xor ebx, ebx
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor edx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor ecx, ecx
mov cx, word [eax]
add ecx, eax
mov eax, dword [esp + 0x48]
mov edi, eax
mov bl, ah
shr eax, 0x10
and eax, 0xff
and edi, 0xff
mov ebp, eax
mov eax, dword [esp + 0x4c]
mov esi, eax
mov dl, ah
shr eax, 0x10
and eax, 0xff
and esi, 0xff
mov dword [esp + 0x44], eax
mov eax, esi
sub eax, edi
and edx, 0xff
mov dword [esp + 0x4c], eax
and ebx, 0xff
mov eax, edx
mov dword [esp + 0x1c], ebx
sub eax, ebx
xor ebx, ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x44]
sub eax, ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x50]
mov bl, ah
mov ebp, eax
and ebx, 0xff
mov dword [esp + 0x2c], edx
shr eax, 0x10
sub ebx, edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x10]
and ebp, 0xff
and eax, 0xff
sub ebp, esi
sub eax, edx
test edi, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], eax
jle 0x413f40
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x48], edi
cmp dword [esp + 0x5c], 0xffffffff
je 0x413e6a
xor eax, eax
xor edx, edx
mov ah, byte [ecx]
mov dl, byte [ecx + 2]
mov al, byte [ecx + 1]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x5c]
cmp edx, eax
je 0x413f2a
xor eax, eax
mov al, byte [ecx]
lea edx, [eax + eax*4]
lea edx, [eax + edx*2]
xor eax, eax
mov al, byte [ecx + 1]
lea esi, [eax*8]
sub esi, eax
lea esi, [eax + esi*4]
lea eax, [eax + esi*2]
add edx, eax
xor eax, eax
mov al, byte [ecx + 2]
imul eax, eax, 0x1e
add edx, eax
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x58]
mov esi, edx
and eax, 0xff
cmp esi, eax
jge 0x413eee
mov eax, esi
mov edi, ebx
imul eax, dword [esp + 0x4c]
cdq
and edi, 0xff
idiv edi
add al, byte [esp + 0x14]
mov byte [ecx + 2], al
mov eax, esi
imul eax, dword [esp + 0x18]
cdq
idiv edi
add al, byte [esp + 0x1c]
mov byte [ecx + 1], al
mov eax, esi
imul eax, dword [esp + 0x20]
cdq
idiv edi
mov dl, byte [esp + 0x24]
jmp 0x413f26
sub esi, eax
mov edi, ebx
mov eax, esi
and edi, 0xff
imul eax, ebp
cdq
idiv edi
add al, byte [esp + 0x28]
mov byte [ecx + 2], al
mov eax, esi
imul eax, dword [esp + 0x50]
cdq
idiv edi
add al, byte [esp + 0x2c]
mov byte [ecx + 1], al
mov eax, esi
imul eax, dword [esp + 0x30]
cdq
idiv edi
mov dl, byte [esp + 0x44]
add al, dl
mov byte [ecx], al
mov eax, dword [esp + 0x48]
add ecx, 4
dec eax
mov dword [esp + 0x48], eax
jne 0x413e46
mov edi, dword [esp + 0x10]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, dword [esp + 0x34]
mov esi, eax
push 0
mov edx, dword [ecx]
lea eax, [edx + edi*4]
mov edi, dword [esp + 0x3c]
add eax, ecx
push edi
push eax
push 4
push edi
push esi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
push esi
push 0
mov ebx, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
pop ebp
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x30
ret