Function at 0x40b143
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4979ff
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x4bea34]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov dword [esp + 0x30], ecx
movzx edi, word [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceW]
push 0xf0
push edi
push dword [0x4c3614]
call esi
and dword [esp + 0x2c], 0
and dword [esp + 0x10], 0
test eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_LoadResource]
je 0x40b1b7
push eax
push dword [0x4c3614]
call ebx
test eax, eax
je 0x40b1b7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [esp + 0x2c], eax
push 5
push edi
push dword [0x4c3614]
call esi
test eax, eax
je 0x40b4be
push eax
push dword [0x4c3614]
call ebx
test eax, eax
je 0x40b4b5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x40b4b5
movzx ecx, word [eax + 2]
xor edx, edx
cmp cx, 0xffff
sete dl
cmp cx, 0xffff
mov dword [esp + 0x14], edx
lea edx, [eax + 0x10]
je 0x40b209
lea edx, [eax + 8]
movzx edi, word [edx]
mov ecx, eax
mov dword [esp + 0x34], edi
call fcn.00405ed9
mov esi, eax
mov eax, dword [esp + 0x30]
push 5
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetWindow]
and dword [esp + 0x20], 0
test di, di
mov dword [esp + 0x1c], eax
jbe 0x40b4be
cmp dword [esp + 0x14], 0
je 0x40b246
mov ebx, dword [esi + 0x14]
jmp 0x40b24a
movzx ebx, word [esi + 0x10]
push dword [esp + 0x14]
mov eax, esi
call fcn.00405fec
test al, al
pop ecx
je 0x40b445
and dword [esp + 0x28], 0
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x30]
push ebx
call fcn.00405fb2
and dword [esp + 0x20], 0
pop ecx
pop ecx
mov ebx, eax
and dword [esp + 0x58], 0
test ebx, ebx
je 0x40b2c2
push ebx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x40b481
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push ebx
push dword [esp + 0x2c]
push ebx
push eax
call fcn.004059a5
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [esp + 0x18]
push eax
push 1
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
and dword [esp + 0x28], 0
lea eax, [esp + 0x28]
mov byte [esp + 0x58], 1
mov ecx, dword [esp + 0x18]
push eax
call fcn.0040614a
test eax, eax
pop ecx
mov dword [esp + 0x10], eax
jl 0x40b426
and dword [esp + 0x24], 0
call fcn.0040987f
mov edi, dword [esp + 0x14]
test edi, edi
lea eax, [esi + 0x18]
jne 0x40b2ff
lea eax, [esi + 0x12]
test edi, edi
mov dword [esp + 0x10], eax
je 0x40b30d
movzx eax, word [esi + 0xc]
jmp 0x40b311
movzx eax, word [esi + 8]
test edi, edi
movsx edx, ax
mov dword [esp + 0x3c], edx
je 0x40b322
movzx eax, word [esi + 0xe]
jmp 0x40b326
movzx eax, word [esi + 0xa]
test edi, edi
movsx ecx, ax
mov dword [esp + 0x40], ecx
je 0x40b337
movzx eax, word [esi + 0x10]
jmp 0x40b33b
movzx eax, word [esi + 0xc]
movsx eax, ax
add eax, edx
test edi, edi
mov dword [esp + 0x44], eax
je 0x40b34e
movzx eax, word [esi + 0x12]
jmp 0x40b352
movzx eax, word [esi + 0xe]
mov ebx, dword [esp + 0x30]
movsx eax, ax
add eax, ecx
mov dword [esp + 0x48], eax
lea eax, [esp + 0x3c]
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_MapDialogRect]
test edi, edi
je 0x40b376
mov edx, dword [esi + 0x14]
jmp 0x40b37a
movzx edx, word [esi + 0x10]
test edi, edi
je 0x40b383
mov edi, dword [esi + 4]
jmp 0x40b385
xor edi, edi
cmp dword [esp + 0x14], 0
je 0x40b391
mov eax, dword [esi + 8]
jmp 0x40b393
mov eax, dword [esi]
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push edi
or eax, 0x10000
push eax
push ecx
mov dword [ecx], edx
mov eax, esp
lea ecx, [esp + 0x4c]
mov dword [esp + 0x48], esp
mov dword [eax], ecx
push dword [ebx + 4]
lea eax, [esp + 0x38]
push eax
call fcn.0040b6dd
mov ebx, dword [esp + 0x24]
xor edi, edi
cmp ebx, edi
je 0x40b41d
cmp dword [esp + 0x14], edi
je 0x40b3db
mov eax, dword [esi]
cmp eax, edi
je 0x40b3db
push eax
push ebx
call dword [sym.imp.USER32.dll_SetWindowContextHelpId]
push dword [esp + 0x28]
lea ecx, [esp + 0x28]
push dword [esp + 0x1c]
push dword [esp + 0x18]
call fcn.0040be3d
cmp eax, edi
mov dword [esp + 0x10], eax
jl 0x40b496
cmp word [esp + 0x20], di
jne 0x40b407
mov dword [esp + 0x1c], edi
push 0x13
push dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
call fcn.00406344
mov dword [esp + 0x1c], ebx
jmp 0x40b426
call fcn.00405a80
mov dword [esp + 0x10], eax
push dword [esp + 0x28]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
or dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40b45d
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40b45d
cmp word [esp + 0x20], 0
je 0x40b45d
push 2
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [esp + 0x1c], eax
push dword [esp + 0x14]
mov eax, esi
call fcn.00405f55
inc dword [esp + 0x24]
mov esi, eax
mov ax, word [esp + 0x24]
cmp ax, word [esp + 0x38]
pop ecx
jb 0x40b23a
jmp 0x40b4be
or dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x18]
mov dword [esp + 0x10], 0x8007000e
test eax, eax
jmp 0x40b4ab
push dword [esp + 0x28]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
or dword [esp + 0x58], 0xffffffff
mov eax, dword [esp + 0x18]
cmp eax, edi
je 0x40b4be
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40b4be
call fcn.00405a80
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4