Function at 0x405f80
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411ce8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x418014]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x54], esi
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x413248]
mov ecx, esi
call edi
test eax, eax
jne 0x406590
xorps xmm0, xmm0
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], eax
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], eax
movlpd qword [ebp - 0x1c], xmm0
push 0x40
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
call fcn.004102c1
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x1c], eax
mov byte [ebp - 4], 1
call fcn.0040b5e0
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040b5e0
cmp dword [eax + 0x1c], 0
jne 0x406066
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x413248]
mov ecx, esi
call edi
test eax, eax
jne 0x406066
call fcn.0040b5e0
push 0xffffffffffffffff
lea ecx, [eax + 0x38]
add eax, 0x2c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SleepConditionVariableCS]
call fcn.0040b5e0
cmp dword [eax + 0x1c], 0
je 0x406031
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x413248]
mov ecx, esi
call edi
test eax, eax
jne 0x406516
call fcn.0040b5e0
mov edi, eax
lea ecx, [ebp - 0x34]
push 0xffffffffffffffff
push edi
mov dword [ebp - 0x50], edi
call fcn.0040eb37
mov ecx, edi
call fcn.0040ecb3
add edi, 0x18
lea ecx, [esi + 0x50]
push edi
call fcn.004037f0
mov edi, dword [edi]
mov eax, dword [ebp - 0x50]
add eax, 0x18
mov ecx, eax
push dword [edi + 4]
push eax
call fcn.00403cd0
mov eax, dword [ebp - 0x50]
mov dword [edi + 4], edi
mov dword [edi], edi
mov dword [edi + 8], edi
mov dword [eax + 0x1c], 0
add eax, 0x28
push eax
call dword [sym.imp.KERNEL32.dll_WakeConditionVariable]
call fcn.0040b5e0
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 2
cmp dword [esi + 0x34], 0
jne 0x4061bd
push str.mapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0xc
mov dword [esi + 0x18], eax
call fcn.004102c1
add esp, 4
mov dword [ebp - 0x50], eax
xorps xmm0, xmm0
movq qword [eax], xmm0
push str.MAPIFreeBuffer
mov dword [eax + 8], 0
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MAPIAllocateBuffer
push dword [esi + 0x18]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x50]
push str.MAPIInitialize
mov dword [ecx], vtable.MapiAllocator.0
mov dword [ecx + 4], eax
mov dword [ecx + 8], edi
push dword [esi + 0x18]
mov dword [esi + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MAPIUninitialize
push dword [esi + 0x18]
mov dword [esi + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MAPILogonEx
push dword [esi + 0x18]
mov dword [esi + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MAPIAdminProfiles
push dword [esi + 0x18]
mov dword [esi + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [esi + 0x24]
mov dword [esi + 0x30], eax
test edi, edi
je 0x4061bd
cmp dword [esi + 0x28], 0
je 0x4061bd
cmp dword [esi + 0x2c], 0
je 0x4061bd
push 0
mov ecx, edi
call dword [0x413248]
call edi
mov dword [esi + 0x14], eax
test eax, eax
js 0x4061bd
mov dword [esi + 0x34], 1
mov ecx, esi
call fcn.00406670
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x84], ecx
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
push 0xffffffffffffffff
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 4
push eax
call fcn.0040eb37
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 2
push eax
mov ecx, esi
call fcn.00406840
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x50], eax
cmp ecx, eax
je 0x406256
mov edi, dword [ebp - 0x1c]
mov eax, ecx
push dword [edi + 4]
push eax
call fcn.00403cd0
mov edx, dword [ebp - 0x50]
mov dword [edi + 4], edi
mov dword [edi], edi
mov dword [edi + 8], edi
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], 0
mov eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x68]
push dword [eax + 4]
lea eax, [ebp - 0x68]
push eax
mov ecx, eax
call fcn.00403cd0
push 0x40
push dword [ebp - 0x68]
call fcn.004102f1
add esp, 8
jmp 0x406287
xorps xmm0, xmm0
mov dword [ebp - 4], 1
movups xmmword [ebp - 0x4c], xmm0
mov dword [ebp - 0x4c], 0
movq qword [ebp - 0x3c], xmm0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov byte [ebp - 4], 6
push dword [esi + 0x14]
sub esp, 0x18
mov ecx, esp
push 0
push 0xffffffffffffffff
push 0x413c94
call fcn.0040e628
lea eax, [ebp - 0x4c]
push eax
call fcn.0040f90b
add esp, 0x20
lea ecx, [ebp - 0x80]
push 0
push 0xffffffffffffffff
push str.error
call fcn.0040e628
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.004036b0
push 0xffffffffffffffff
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, eax
call fcn.0040eb37
mov byte [ebp - 4], 6
xor eax, eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x70], eax
test ecx, ecx
je 0x406331
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x70]
add esp, 4
push 2
push eax
call fcn.004102f1
mov ecx, dword [ebp - 0x78]
xor eax, eax
add esp, 8
mov dword [ebp - 0x78], eax
test ecx, ecx
je 0x406354
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x78]
add esp, 4
push 1
push eax
call fcn.004102f1
add esp, 8
call fcn.0040b5e0
add eax, 0x50
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040b5e0
cmp dword [eax + 0x24], 0
je 0x4063a0
nop dword [eax]
call fcn.0040b5e0
push 0xffffffffffffffff
lea ecx, [eax + 0x50]
add eax, 0x30
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SleepConditionVariableCS]
call fcn.0040b5e0
cmp dword [eax + 0x24], 0
jne 0x406380
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040b7b0
mov byte [ebp - 4], 8
call fcn.0040b5e0
mov edi, eax
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 9
push eax
lea ecx, [edi + 0x20]
call fcn.004037f0
lea eax, [edi + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_WakeConditionVariable]
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x60]
push dword [eax + 4]
lea eax, [ebp - 0x60]
push eax
mov ecx, eax
call fcn.00403cd0
push 0x40
push dword [ebp - 0x60]
call fcn.004102f1
add esp, 8
call fcn.0040b5e0
add eax, 0x50
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 1
xor eax, eax
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
test ecx, ecx
je 0x40641e
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x3c]
add esp, 4
push 2
push eax
call fcn.004102f1
mov ecx, dword [ebp - 0x44]
xor eax, eax
add esp, 8
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x406441
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x44]
add esp, 4
push 1
push eax
call fcn.004102f1
mov eax, dword fs:[0x2c]
add esp, 8
mov ecx, dword [eax]
mov eax, dword [0x418738]
cmp eax, dword [ecx + 4]
jle 0x406496
push 0x418738
call fcn.0041046a
add esp, 4
cmp dword [0x418738], 0xffffffff
jne 0x406496
mov byte [ebp - 4], 0xa
call fcn.00405e40
push 0x418738
mov byte [0x418734], al
mov byte [ebp - 4], 1
call fcn.00410420
add esp, 4
cmp byte [0x418734], 0
je 0x4064a6
mov ecx, esi
call fcn.004065c0
mov eax, dword [ebp - 0x1c]
push dword [eax + 4]
lea eax, [ebp - 0x1c]
push eax
mov ecx, eax
call fcn.00403cd0
push 0x40
push dword [ebp - 0x1c]
call fcn.004102f1
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x24]
add esp, 8
mov dword [ebp - 0x24], eax
test ecx, ecx
je 0x4064e3
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x24]
add esp, 4
push 2
push eax
call fcn.004102f1
mov ecx, dword [ebp - 0x2c]
xor eax, eax
add esp, 8
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x406506
push ecx
call fcn.00410323
mov eax, dword [ebp - 0x2c]
add esp, 4
push 1
push eax
call fcn.004102f1
add esp, 8
jmp 0x405fb3
call fcn.0040b5e0