Function at 0x40bad7b9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x84
mov eax, dword [0x40bb1020]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x98]
push 5
push 0x4b
push dword [eax + 0x34]
xor esi, esi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x6c], esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
cmp ebx, esi
je 0x40badaa8
mov eax, dword [edi + 0x98]
push ebx
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x74], eax
cmp eax, esi
je 0x40badaa8
mov eax, dword [edi + 0x98]
push ebx
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x7c], eax
cmp eax, esi
je 0x40badaa8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x68], eax
cmp eax, esi
je 0x40bada9f
mov ecx, 0xffff
cmp word [eax + 2], cx
je 0x40bad9f6
push esi
push esi
push 0x31
push dword [edi + 0xc]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp eax, esi
je 0x40bada9f
lea ecx, [ebp - 0x60]
push ecx
push 0x5c
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x40bada9f
push dword [edi + 0xc]
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0x5a
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push dword [edi + 0xc]
mov ebx, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
test ebx, ebx
je 0x40bada9f
mov eax, dword [ebp - 0x60]
imul eax, eax, 0xffffffb8
xor edx, edx
div ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
movzx eax, ax
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x44]
push eax
call ebx
mov ecx, dword [ebp - 0x74]
lea eax, [ecx + eax*2 + 2]
push eax
push 0
mov dword [ebp - 0x78], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x70], eax
test eax, eax
je 0x40bada9f
mov esi, dword [ebp - 0x68]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, dword [ebp - 0x68]
lea esi, [eax + 0x12]
mov eax, 0xffff
add edi, 0x12
mov ecx, eax
mov dword [ebp - 0x6c], 1
cmp cx, word [edi]
jne 0x40bad923
mov word [esi], cx
push 2
pop ecx
add edi, ecx
mov dx, word [edi]
add esi, ecx
mov word [esi], dx
add esi, ecx
add edi, ecx
jmp 0x40bad946
push edi
call ebx
lea eax, [eax + eax + 2]
push eax
push edi
push esi
mov dword [ebp - 0x64], eax
call sub.msvcrt.dll_memcpy
add esi, dword [ebp - 0x64]
add esp, 0xc
add edi, dword [ebp - 0x64]
push 2
mov eax, 0xffff
pop ecx
mov edx, eax
cmp dx, word [edi]
jne 0x40bad960
mov word [esi], ax
add edi, ecx
mov ax, word [edi]
add esi, ecx
mov word [esi], ax
add esi, ecx
add edi, ecx
jmp 0x40bad97b
push edi
call ebx
lea eax, [eax + eax + 2]
push eax
push edi
push esi
mov dword [ebp - 0x64], eax
call sub.msvcrt.dll_memcpy
add esi, dword [ebp - 0x64]
add esp, 0xc
add edi, dword [ebp - 0x64]
push edi
call ebx
lea eax, [eax + eax + 2]
push eax
push edi
push esi
mov dword [ebp - 0x64], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x68]
add esi, dword [ebp - 0x64]
add edi, dword [ebp - 0x64]
add esp, 0xc
test byte [eax], 0x40
je 0x40bad9a7
inc edi
inc edi
push edi
call ebx
lea edi, [edi + eax*2 + 2]
mov ax, word [ebp - 0x84]
mov word [esi], ax
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x78]
inc esi
inc esi
sub eax, esi
add eax, dword [ebp - 0x70]
shr eax, 1
push eax
push esi
call fcn.40ba2f04
lea eax, [ebp - 0x44]
push eax
call ebx
mov ecx, dword [ebp - 0x74]
lea esi, [esi + eax*2 + 5]
lea eax, [edi + 3]
and eax, 0xfffffffc
sub ecx, eax
add ecx, dword [ebp - 0x68]
and esi, 0xfffffffc
push ecx
push eax
push esi
call sub.msvcrt.dll_memcpy
mov esi, dword [ebp - 0x70]
mov edi, dword [ebp - 0x80]
add esp, 0xc
jmp 0x40bad9f8
mov esi, eax
mov eax, dword [edi + 0x98]
push edi
push 0x40bad2a2
push dword [edi + 0xc]
push esi
push dword [eax + 0x34]
call dword [sym.imp.USER32.dll_DialogBoxIndirectParamW]
test eax, eax
jle 0x40bada7b
push dword [edi + 0x6c]
push dword [edi + 0x40]
push edi
call fcn.40bab026
mov ebx, eax
test ebx, ebx
je 0x40bada2e
push ebx
push edi
call fcn.40bab11f
push edi
call fcn.40bab230
push edi
call fcn.40bab388
push 0
push edi
call fcn.40bac456
test ebx, ebx
je 0x40bada58
mov eax, dword [ebx + 8]
inc eax
inc eax
push eax
push 0xffffffffffffffff
push dword [edi + 0x20]
call fcn.40baac89
jmp 0x40bada5b
or eax, 0xffffffff
mov ecx, eax
inc ecx
neg ecx
push 0
sbb ecx, ecx
and ecx, eax
push ecx
push 0x14e
push dword [edi + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
push edi
call fcn.40bab879
test esi, esi
je 0x40bada9f
cmp dword [ebp - 0x6c], 0
je 0x40bada9f
mov edi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call edi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.40ba1e8c
leave
ret 4