Function at 0x413850
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x40], esi
call fcn.004bffe1
xor ebp, ebp
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
call fcn.004d3817
mov ecx, dword [esp + 0x4c]
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 + 0x48], ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
cmp edi, ebp
mov dword [esp + 0x38], esi
je 0x4138ef
cmp ebx, ebp
je 0x4138ef
cmp esi, ebp
je 0x4138ef
xor eax, eax
mov ax, word [esi + 0x20]
cmp eax, ebp
mov dword [esp + 0x10], eax
jne 0x4138d0
mov dword [esp + 0x10], pe_nt_image_headers32
mov edx, dword [esi]
add edx, 0x400
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [esp + 0x3c], eax
jne 0x4138fb
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret 0x18
mov ecx, dword [esi]
mov edi, eax
add ecx, 0x400
xor ebx, ebx
mov edx, ecx
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 + 0x50]
mov edi, eax
mov bl, ah
shr eax, 0x10
and eax, 0xff
and edi, 0xff
mov ebp, eax
mov eax, dword [esp + 0x54]
mov esi, eax
mov dl, ah
shr eax, 0x10
and eax, 0xff
and esi, 0xff
mov dword [esp + 0x4c], eax
mov eax, esi
sub eax, edi
and edx, 0xff
mov dword [esp + 0x14], eax
and ebx, 0xff
mov eax, edx
mov dword [esp + 0x20], ebx
sub eax, ebx
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x4c]
sub eax, ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x58]
mov bl, ah
mov ebp, eax
and ebx, 0xff
and ebp, 0xff
shr eax, 0x10
mov dword [esp + 0x30], edx
sub ebx, edx
mov edx, dword [esp + 0x4c]
mov dword [esp + 0x2c], esi
sub ebp, esi
mov esi, dword [esp + 0x10]
and eax, 0xff
mov dword [esp + 0x18], edi
sub eax, edx
mov dword [esp + 0x58], ebx
test esi, esi
mov dword [esp + 0x34], eax
jle 0x413aac
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x5c]
and eax, 0xff
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], eax
xor eax, eax
mov al, byte [ecx + 1]
lea edx, [eax*8]
sub edx, eax
lea edx, [eax + edx*4]
lea edx, [eax + edx*2]
xor eax, eax
mov al, byte [ecx]
lea esi, [eax + eax*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 + 0x54]
mov esi, edx
cmp esi, eax
jge 0x413a5a
mov eax, esi
mov edi, ebx
imul eax, dword [esp + 0x14]
cdq
and edi, 0xff
idiv edi
add al, byte [esp + 0x18]
mov byte [ecx + 2], al
mov eax, esi
imul eax, dword [esp + 0x1c]
cdq
idiv edi
add al, byte [esp + 0x20]
mov byte [ecx + 1], al
mov eax, esi
imul eax, dword [esp + 0x24]
cdq
idiv edi
mov dl, byte [esp + 0x28]
jmp 0x413a92
sub esi, eax
mov edi, ebx
mov eax, esi
and edi, 0xff
imul eax, ebp
cdq
idiv edi
add al, byte [esp + 0x2c]
mov byte [ecx + 2], al
mov eax, esi
imul eax, dword [esp + 0x58]
cdq
idiv edi
add al, byte [esp + 0x30]
mov byte [ecx + 1], al
mov eax, esi
imul eax, dword [esp + 0x34]
cdq
idiv edi
mov dl, byte [esp + 0x4c]
add al, dl
mov byte [ecx], al
mov eax, dword [esp + 0x50]
add ecx, 4
dec eax
mov dword [esp + 0x50], eax
jne 0x4139db
mov esi, dword [esp + 0x10]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, dword [esp + 0x38]
mov edi, eax
push 0
mov ecx, dword [ebp]
lea eax, [ecx + esi*4]
mov esi, dword [esp + 0x40]
add eax, ebp
push esi
push eax
push 4
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov ebx, dword [esp + 0x40]
push edi
push 0
mov dword [ebx + 4], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x44]
push edx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebx + 4]
test eax, eax
je 0x4138ef
mov eax, dword [ebp + 4]
pop edi
mov dword [ebx + 8], eax
mov ecx, dword [ebp + 8]
pop esi
mov dword [ebx + 0xc], ecx
pop ebp
mov eax, 1
pop ebx
add esp, 0x38
ret 0x18