Function at 0x406a91
Capabilities:
Create thread

Disassembly:
sub esp, 0x54
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov ecx, dword [ebp + 0x210]
sub ecx, 0x10
call fcn.0040ab13
lea edi, [ebp + 0x24]
xor ebx, ebx
lea esi, [eax + 0x10]
mov eax, dword [edi + 4]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], eax
test eax, eax
jle 0x406b1b
push ebx
mov ecx, edi
call fcn.00409fc2
cmp dword [eax], 0x14
je 0x406ad9
inc ebx
cmp ebx, dword [esp + 0x10]
jl 0x406ac3
jmp 0x406b1b
test ebx, ebx
js 0x406b1b
cmp ebx, dword [edi + 4]
jge 0x406b1b
mov ecx, dword [edi]
mov eax, ebx
mov ecx, dword [ecx + eax*8 + 4]
sub ecx, 0x10
call fcn.004052ff
mov edx, dword [edi + 4]
lea eax, [edx - 1]
cmp ebx, eax
je 0x406b18
mov eax, dword [edi]
sub edx, ebx
shl edx, 3
lea ecx, [eax + ebx*8]
lea eax, [edx - 8]
push eax
lea eax, [ecx + 8]
push eax
push edx
push ecx
call fcn.0040a7c6
add esp, 0x10
dec dword [edi + 4]
call fcn.0040522e
push eax
lea ecx, [esp + 0x14]
call fcn.004028b4
lea eax, [esp + 0x10]
mov ecx, edi
push eax
push 0x15
call fcn.004141a6
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.004052ff
cmp dword [esi - 0xc], 0
mov ecx, ebp
je 0x406c0e
push dword [esp + 0x6c]
lea eax, [esp + 0x18]
push eax
lea eax, [ebp + 0x98]
push eax
push dword [esp + 0x74]
call fcn.00407f93
mov esi, dword [esp + 0x14]
test al, al
je 0x406be6
mov ecx, esi
call fcn.00417314
test al, al
jne 0x406bee
call fcn.0040522e
push eax
lea ecx, [esp + 0x6c]
call fcn.004028b4
push esi
lea eax, [esp + 0x6c]
push 0xf7
push eax
call fcn.0040a582
mov edi, dword [esp + 0x74]
add esp, 0xc
cmp byte [0x449ac4], 0
je 0x406bd3
push edi
lea ecx, [esp + 0x70]
call fcn.00415236
mov ecx, eax
call fcn.0041524a
push eax
mov ecx, 0x449a94
call fcn.0041466e
mov ecx, dword [esp + 0x6c]
lea ecx, [ecx - 0x10]
call fcn.004052ff
mov dl, 1
lea ecx, [esp + 0x68]
call fcn.004162fd
lea ecx, [edi - 0x10]
call fcn.004052ff
or ebx, 0xffffffff
jmp 0x406f51
lea eax, [esp + 0x14]
push eax
lea ecx, [ebp + 0x1f4]
call fcn.00409e7f
push dword [esp + 0x68]
mov ecx, ebp
call fcn.0040881a
jmp 0x406f4e
call fcn.00409282
test al, al
jne 0x406c27
test byte [ebp + 0x7c], 1
je 0x406c23
test byte [ebp + 0x7c], 0x48
je 0x406c27
mov bl, 1
jmp 0x406c29
xor bl, bl
call fcn.0040522e
push eax
lea ecx, [esp + 0x18]
call fcn.004028b4
push 0x13
mov ecx, edi
call fcn.00414203
test eax, eax
je 0x406c52
add eax, 4
lea ecx, [esp + 0x14]
push eax
call fcn.00409e7f
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
call fcn.0040522e
push eax
lea ecx, [esp + 0x14]
call fcn.004028b4
test bl, bl
je 0x406d40
test dword [ebp + 0x7c], 0x1000
je 0x406d05
mov eax, dword [esp + 0x14]
xor ebx, ebx
cmp dword [eax - 0xc], ebx
jne 0x406d05
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x38], 0x443df8
call fcn.0040522e
push eax
lea ecx, [esp + 0x5c]
call fcn.004028b4
call fcn.0040522e
push eax
lea ecx, [esp + 0x60]
call fcn.004028b4
push ebx
lea ecx, [ebp + 0x17c]
mov byte [esp + 0x64], bl
call fcn.00413db6
push eax
lea ecx, [esp + 0x60]
call fcn.00409e7f
lea ecx, [esp + 0x38]
call fcn.00419924
cmp byte [esp + 0x60], bl
jne 0x406cfc
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x18]
call fcn.00409e7f
lea ecx, [esp + 0x38]
call fcn.004197c7
lea eax, [esp + 0x2c]
push eax
lea ecx, [ebp + 0x17c]
call fcn.00413f9c
mov esi, eax
lea edi, [esp + 0x20]
push 0x8d
lea ecx, [esp + 0x14]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00404cca
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x10]
push edi
mov eax, dword [ecx]
call dword [eax + 0x18]
mov esi, dword [esp + 0x18]
jmp 0x406d44
mov edi, dword [esp + 0x10]
lea ecx, [ebp + 0x188]
call fcn.0040f4f8
lea eax, [esp + 0x14]
push eax
lea ecx, [ebp + 0x130]
call fcn.00409e7f
call fcn.0040522e
push eax
lea ecx, [esp + 0x14]
call fcn.004028b4
push 0
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp + 0x38]
call fcn.0040c7cf
mov ebx, eax
xor ecx, ecx
mov eax, dword [ebp + 0x114]
mov dword [esp + 0x18], ebx
cmp dword [eax - 0xc], ecx
jne 0x406dde
push ecx
push ecx
push 1
push ecx
lea ebx, [ebp + 0x1e0]
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
mov ecx, ebx
call fcn.00409839
lea eax, [esp + 0x1c]
push eax
xor eax, eax
push eax
push ebp
push 0x406f65
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
lea ecx, [ebp + 0x1d8]
call fcn.00409839
push 0xffffffffffffffff
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esp + 0x18]
lea ecx, [ebp + 0x17c]
call fcn.00413ff4
test ebx, ebx
je 0x406e2b
mov ecx, 0x449acc
call fcn.00416762
lea eax, [esp + 0x68]
push eax
lea ecx, [ebp + 0x38]
call fcn.0040c75a
push eax
push ebx
mov ecx, ebp
call fcn.0040897f
mov ecx, dword [esp + 0x68]
lea ecx, [ecx - 0x10]
call fcn.004052ff
cmp byte [ebp + 0x1d0], 0
jne 0x406e8f
and dword [ebp + 0xc8], 0
jmp 0x406e8f
push 4
push 0
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040999a
push str.__
mov ecx, eax
call fcn.0040a0e8
mov ecx, dword [esp + 0x18]
mov ebx, eax
neg ebx
sbb bl, bl
add ecx, 0xfffffff0
call fcn.004052ff
add bl, 1
je 0x406e6d
push 4
push 0
lea ecx, [esp + 0x18]
call fcn.00409df3
push dword [esp + 0x6c]
lea eax, [esp + 0x14]
mov ecx, ebp
push eax
lea eax, [ebp + 0x98]
push eax
push dword [esp + 0x74]
call fcn.00407f93
test al, al
jne 0x406eb4
or ebx, 0xffffffff
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.004052ff
lea ecx, [edi - 0x10]
call fcn.004052ff
mov ecx, dword [esp + 0x14]
lea ecx, [ecx - 0x10]
call fcn.004052ff
jmp 0x406f51
lea eax, [esp + 0x10]
push eax
lea ecx, [ebp + 0x1f4]
call fcn.00409e7f
push dword [esp + 0x68]
mov ecx, ebp
call fcn.0040881a
test eax, eax
jne 0x406f0e
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x406ee8
cmp eax, 0x669
je 0x406ee8
cmp eax, 0xbc2
jne 0x406f0e
mov eax, dword [ebp + 0x1d4]
cmp dword [eax - 0xc], 0
je 0x406f21
push eax
call dword [sym.imp.msi.dll_MsiRecordGetStringA]
cmp eax, 5
setne al
test al, al
je 0x406f21
and dword [ebp + 0xc8], 0
jmp 0x406f21
cmp byte [ebp + 0x1d0], 0
jne 0x406f21
mov dword [ebp + 0xc8], 4
cmp dword [ebp + 0x18], 0x642
jne 0x406f2e
or dword [ebp + 0x18], 0xffffffff
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.004052ff
lea ecx, [edi - 0x10]
call fcn.004052ff
mov ecx, dword [esp + 0x14]
lea ecx, [ecx - 0x10]
call fcn.004052ff
mov ebx, dword [ebp + 0x18]
lea ecx, [esi - 0x10]
call fcn.004052ff
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x54
ret 8