Function at 0x409f00
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, 0x68
mov ebx, 0x72
mov edi, 0x73
sub esp, 0x4cc
mov dword [ebp - 0x498], eax
xor eax, eax
mov word [ebp - 0x472], ax
test byte [ecx], 0x40
mov eax, dword [ebp + 8]
mov dword [ebp - 0x4b0], ecx
mov word [ebp - 0x478], bx
mov word [ebp - 0x476], si
mov word [ebp - 0x474], di
mov dword [ebp - 0x454], 5
mov dword [ebp - 0x45c], eax
movzx eax, dx
mov dword [ebp - 0x458], 0xffff0002
mov dword [ebp - 0x4a8], eax
mov dword [ebp - 0x494], 0
je 0x409f8d
add eax, 7
mov dword [ebp - 0x494], 7
mov dword [ebp - 0x4a8], eax
mov esi, dword [ebp - 0x4a8]
cmp dword [ebp - 0x494], esi
jge 0x40a1bd
nop
mov ebx, dword [ebp - 0x498]
lea esi, [ebp - 0x484]
mov eax, dword [ebx]
mov dword [esp + 8], esi
mov esi, dword [ebp - 0x494]
mov dword [esp], ebx
mov dword [esp + 4], esi
call dword [eax + 0x14]
sub esp, 0xc
test eax, eax
js 0x40a1a4
lea edx, [ebp - 0x47c]
mov eax, dword [ebx]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x480]
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x484]
mov edx, dword [edx]
mov dword [esp], ebx
mov dword [esp + 4], edx
call dword [eax + 0x30]
sub esp, 0x18
test eax, eax
js 0x40a1a4
lea edi, [ebp - 0x418]
xor eax, eax
mov ecx, pe_nt_image_headers32
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x218]
mov ecx, pe_nt_image_headers32
rep stosd dword es:[edi], eax
call dbg.InitializeTLData
mov esi, eax
mov eax, dword [ebp - 0x480]
mov ebx, dword [sym.imp.oleaut32.dll_SysStringLen]
mov dword [esp], eax
call ebx
mov dword [ebp - 0x440], eax
mov eax, dword [ebp - 0x480]
sub esp, 4
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x444], eax
mov eax, dword [ebp - 0x484]
cmp dword [eax], 0x5fffffff
jle 0x40a1d0
mov edi, dword [ebp - 0x4b0]
test byte [edi], 0x40
jne 0x40a1d0
mov edi, dword [ebp - 0x498]
mov ecx, dword [eax + 0x20]
lea edx, [ebp - 0x218]
mov dword [esp + 4], edi
movzx eax, word [eax + 0x24]
mov word [esp], ax
lea eax, [ebp - 0x418]
call sym._CreateTypeInfo.isra.0
mov eax, dword [ebp - 0x484]
mov eax, dword [eax + 0x10]
cmp eax, 4
je 0x40aacc
cmp eax, 8
je 0x40aa99
cmp eax, 2
je 0x40aa27
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call ebx
sub esp, 4
test eax, eax
lea eax, [esi + 0x204]
mov dword [ebp - 0x4a0], eax
je 0x40a31c
mov edx, eax
mov ecx, 0x410480
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a2cb
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x410558
mov eax, esi
call sym._AddToTLDataStrW.isra.2
lea eax, [ebp - 0x45c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1132
mov dword [esp + 0xc], eax
mov eax, dword [0x41a724]
mov dword [esp], eax
call dword [sym.imp.user32.dll_SendMessageW]
mov esi, dword [ebp - 0x49c]
sub esp, 0x10
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [ebp - 0x480]
sub esp, 0xc
mov esi, dword [ebp - 0x4a4]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x47c]
sub esp, 4
mov dword [esp], eax
call esi
mov esi, dword [ebp - 0x498]
mov edx, dword [ebp - 0x484]
sub esp, 4
mov eax, dword [esi]
mov dword [esp + 4], edx
mov dword [esp], esi
call dword [eax + 0x50]
sub esp, 8
add dword [ebp - 0x494], 1
mov eax, dword [ebp - 0x494]
cmp eax, dword [ebp - 0x4a8]
jne 0x409fa0
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [esi + 0x204]
mov ecx, 0x410480
mov edi, eax
mov edx, eax
mov dword [ebp - 0x4a0], eax
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, edi
mov ecx, 0x41072c
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, edi
mov ecx, 0x410458
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
mov eax, dword [eax]
mov dword [esp + 4], str.0x_.8lx
mov dword [esp + 8], eax
lea eax, [ebp - 0x418]
mov dword [esp], eax
call dword [sym.imp.user32.dll_wsprintfW]
lea ecx, [ebp - 0x418]
mov edx, edi
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, edi
mov ecx, 0x41045c
mov eax, esi
lea edi, [ebp - 0x418]
call sym._AddToTLDataStrW.isra.2
xor eax, eax
mov ecx, pe_nt_image_headers32
lea edx, [ebp - 0x218]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x484]
mov edi, dword [ebp - 0x498]
mov ecx, dword [eax + 0x20]
mov dword [esp + 4], edi
movzx eax, word [eax + 0x24]
mov word [esp], ax
lea eax, [ebp - 0x418]
call sym._CreateTypeInfo.isra.0
mov eax, dword [ebp - 0x484]
mov eax, dword [eax + 0x10]
cmp eax, 4
je 0x40aa60
cmp eax, 8
je 0x40aa80
cmp eax, 2
je 0x40aab5
mov eax, dword [ebp - 0x47c]
mov dword [esp], eax
call ebx
sub esp, 4
test eax, eax
je 0x40a30a
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x410484
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ebx, dword [ebp - 0x4a0]
mov ecx, str.helpstring
mov eax, esi
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x410460
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, dword [ebp - 0x47c]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x410466
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x41048a
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x4b0]
movzx eax, word [eax]
test ah, 1
mov word [ebp - 0x48c], ax
je 0x40a950
mov edx, dword [ebp - 0x4a0]
mov ecx, str.HRESULT
mov eax, esi
call sym._AddToTLDataStrW.isra.2
lea eax, [ebp - 0x418]
mov dword [esp + 4], str.void
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
je 0x40a974
mov edx, dword [ebp - 0x484]
movzx eax, word [edx + 0x18]
add eax, 1
mov word [edx + 0x18], ax
cwde
mov dword [esp + 4], 0
lea eax, [eax*4 + 4]
mov ebx, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x484]
mov edi, dword [ebp - 0x498]
sub esp, 0xc
mov dword [ebp - 0x49c], eax
lea eax, [ebp - 0x488]
mov ecx, dword [edi]
mov dword [esp + 0x10], eax
movsx eax, word [edx + 0x18]
add eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x49c]
mov dword [esp + 8], eax
mov eax, dword [edx]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [ecx + 0x1c]
sub esp, 0x14
test eax, eax
mov eax, dword [ebp - 0x49c]
js 0x40a9d4
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.oleaut32.dll_SysFreeString]
mov dword [ebp - 0x4a4], eax
call eax
mov edx, dword [ebp - 0x4a0]
sub esp, 4
mov eax, esi
mov ecx, 0x41044e
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
cmp dword [eax], 0x5fffffff
jg 0x40aa00
mov ecx, dword [ebp - 0x480]
test ecx, ecx
je 0x40a447
mov edx, dword [ebp - 0x4a0]
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ebx, dword [ebp - 0x4a0]
mov ecx, 0x410458
mov eax, esi
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
mov dword [ebp - 0x48c], 0
mov edx, dword [ebp - 0x484]
movsx ecx, word [edx + 0x18]
cmp dword [ebp - 0x48c], ecx
mov eax, ecx
jge 0x40a100
mov ecx, dword [ebp - 0x48c]
test ecx, ecx
jne 0x40a8d0
cmp ax, 1
je 0x40a4bd
mov ecx, 0x41054a
mov edx, ebx
mov eax, esi
mov edi, 4
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x41044e
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
sub edi, 1
jne 0x40a4a4
mov edx, dword [ebp - 0x484]
mov eax, dword [ebp - 0x48c]
mov edi, dword [edx + 8]
shl eax, 4
add edi, eax
mov dword [ebp - 0x490], eax
movzx ecx, word [edi + 0xc]
test cl, 1
jne 0x40a654
test cl, 2
jne 0x40a933
test cl, 4
jne 0x40a920
test cl, 8
jne 0x40a903
test cl, 0x10
mov eax, 1
jne 0x40a8f0
test cl, 0x40
je 0x40a6d9
test eax, eax
jne 0x40a62c
nop
lea esi, [esi]
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, esi
mov ecx, str.hascustdata
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
mov edi, dword [ebp - 0x490]
add edi, dword [eax + 8]
test byte [edi + 0xc], 0x20
mov eax, edi
jne 0x40a9b0
mov edx, ebx
mov ecx, 0x410552
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x484]
lea edi, [ebp - 0x418]
xor eax, eax
mov ecx, pe_nt_image_headers32
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x218]
mov ecx, pe_nt_image_headers32
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x490]
mov edi, dword [ebp - 0x498]
add eax, dword [edx + 8]
mov dword [esp + 4], edi
movzx edx, word [eax + 4]
mov word [esp], dx
mov ecx, dword [eax]
lea edx, [ebp - 0x218]
lea eax, [ebp - 0x418]
call sym._CreateTypeInfo.isra.0
lea ecx, [ebp - 0x418]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
lea ecx, [ebp - 0x218]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, esi
mov ecx, 0x41044e
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
add dword [ebp - 0x48c], 1
mov eax, dword [ebp - 0x48c]
cmp eax, dword [ebp - 0x488]
mov edi, eax
jae 0x40a640
mov edx, dword [ebp - 0x49c]
mov ecx, dword [edx + eax*4]
test ecx, ecx
je 0x40a465
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x49c]
mov eax, dword [edx + edi*4]
mov dword [esp], eax
call dword [ebp - 0x4a4]
sub esp, 4
jmp 0x40a465
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a52e
lea ecx, [ebp - 0x478]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a465
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x4106d4
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x484]
mov edi, dword [ebp - 0x490]
add edi, dword [edx + 8]
movzx ecx, word [edi + 0xc]
test cl, 2
je 0x40a6f0
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x4106cc
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x484]
mov edi, dword [ebp - 0x490]
add edi, dword [edx + 8]
movzx ecx, word [edi + 0xc]
test cl, 4
jne 0x40a834
test cl, 8
jne 0x40a7f0
test cl, 0x10
jne 0x40a710
xor eax, eax
test cl, 0x40
jne 0x40a520
and ecx, 0x20
jne 0x40a881
test eax, eax
jne 0x40a56b
jmp 0x40a557
test cl, 4
jne 0x40a834
test cl, 8
jne 0x40a7f0
xor eax, eax
test cl, 0x10
je 0x40a507
lea esi, [esi]
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, ebx
mov eax, esi
mov ecx, str.optional
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
mov edx, dword [ebp - 0x490]
add edx, dword [eax + 8]
movzx eax, word [edx + 0xc]
test al, 0x40
jne 0x40a520
test al, 0x20
je 0x40a557
mov edi, dword [edx + 8]
lea eax, [edi + 8]
mov dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x470]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_VariantInit]
sub esp, 4
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, str.defaultvalue
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x410458
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
cmp word [edi + 8], 8
je 0x40a983
mov eax, dword [ebp - 0x4ac]
mov dword [esp + 0xc], 8
mov dword [esp + 8], 0
mov dword [esp + 4], eax
lea eax, [ebp - 0x470]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_VariantChangeType]
sub esp, 0x10
test eax, eax
je 0x40a9c0
mov ecx, 0x41045c
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a557
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov edx, ebx
mov eax, esi
mov ecx, str.retval
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
mov edx, dword [ebp - 0x490]
add edx, dword [eax + 8]
movzx eax, word [edx + 0xc]
test al, 0x10
jne 0x40a710
test al, 0x40
jne 0x40a520
jmp 0x40a747
mov ecx, 0x410484
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, esi
mov ecx, 0x4106c4
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
mov edi, dword [ebp - 0x490]
add edi, dword [eax + 8]
movzx eax, word [edi + 0xc]
test al, 8
jne 0x40a7f0
test al, 0x10
jne 0x40a710
test al, 0x40
jne 0x40a520
test al, 0x20
je 0x40a557
xor eax, eax
mov edi, dword [edi + 8]
mov dword [ebp - 0x4b4], eax
lea eax, [edi + 8]
mov dword [ebp - 0x4ac], eax
lea eax, [ebp - 0x470]
mov dword [esp], eax
call dword [sym.imp.oleaut32.dll_VariantInit]
mov eax, dword [ebp - 0x4b4]
sub esp, 4
test eax, eax
je 0x40a76d
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a77b
mov edx, ebx
mov eax, esi
mov ecx, 0x410546
call sym._AddToTLDataStrW.isra.2
mov edx, dword [ebp - 0x484]
movzx eax, word [edx + 0x18]
jmp 0x40a48b
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a71e
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a7fe
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a842
mov ecx, 0x410480
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a696
mov ebx, dword [ebp - 0x4a0]
lea ecx, [ebp - 0x418]
mov eax, esi
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
lea ecx, [ebp - 0x218]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov eax, dword [ebp - 0x484]
movzx eax, word [eax + 0x18]
jmp 0x40a37a
mov edx, ebx
mov eax, esi
mov ecx, 0x41054e
call sym._AddToTLDataStrW.isra.2
mov ecx, dword [edi + 0x10]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x41054e
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a7d6
mov edi, dword [eax + 8]
jmp 0x40a752
mov ecx, dword [ebp - 0x468]
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a7d6
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x40a1a4
mov ebx, dword [ebp - 0x4a0]
mov eax, esi
mov ecx, str._stdcall
mov edx, ebx
call sym._AddToTLDataStrW.isra.2
mov ecx, 0x41044e
mov edx, ebx
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a430
lea eax, [esi + 0x204]
mov ecx, 0x410480
mov dword [ebp - 0x4a0], eax
mov edx, eax
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, str.propget
mov edx, dword [ebp - 0x4a0]
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40a2a7
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x410484
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, str.propput
jmp 0x40aa46
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x410484
mov eax, esi
call sym._AddToTLDataStrW.isra.2
mov ecx, str.propputref
jmp 0x40aa46
lea eax, [esi + 0x204]
mov ecx, 0x410480
mov dword [ebp - 0x4a0], eax
mov edx, eax
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40aa92
mov edx, dword [ebp - 0x4a0]
mov ecx, 0x410484
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40aa41
lea eax, [esi + 0x204]
mov ecx, 0x410480
mov dword [ebp - 0x4a0], eax
mov edx, eax
mov eax, esi
call sym._AddToTLDataStrW.isra.2
jmp 0x40aa72