Function at 0x405f40
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411ca8
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 0x406550
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.00410281
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.0040b5a0
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040b5a0
cmp dword [eax + 0x1c], 0
jne 0x406026
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x413248]
mov ecx, esi
call edi
test eax, eax
jne 0x406026
call fcn.0040b5a0
push 0xffffffffffffffff
lea ecx, [eax + 0x38]
add eax, 0x2c
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SleepConditionVariableCS]
call fcn.0040b5a0
cmp dword [eax + 0x1c], 0
je 0x405ff1
mov eax, dword [esi]
mov edi, dword [eax + 0xc]
mov ecx, edi
call dword [0x413248]
mov ecx, esi
call edi
test eax, eax
jne 0x4064d6
call fcn.0040b5a0
mov edi, eax
lea ecx, [ebp - 0x34]
push 0xffffffffffffffff
push edi
mov dword [ebp - 0x50], edi
call fcn.0040eaf7
mov ecx, edi
call fcn.0040ec73
add edi, 0x18
lea ecx, [esi + 0x50]
push edi
call fcn.004037b0
mov edi, dword [edi]
mov eax, dword [ebp - 0x50]
add eax, 0x18
mov ecx, eax
push dword [edi + 4]
push eax
call fcn.00403c90
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.0040b5a0
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov byte [ebp - 4], 2
cmp dword [esi + 0x34], 0
jne 0x40617d
push str.mapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0xc
mov dword [esi + 0x18], eax
call fcn.00410281
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 0x40617d
cmp dword [esi + 0x28], 0
je 0x40617d
cmp dword [esi + 0x2c], 0
je 0x40617d
push 0
mov ecx, edi
call dword [0x413248]
call edi
mov dword [esi + 0x14], eax
test eax, eax
js 0x40617d
mov dword [esi + 0x34], 1
mov ecx, esi
call fcn.00406630
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.0040eaf7
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 2
push eax
mov ecx, esi
call fcn.00406800
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x50], eax
cmp ecx, eax
je 0x406216
mov edi, dword [ebp - 0x1c]
mov eax, ecx
push dword [edi + 4]
push eax
call fcn.00403c90
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.00403c90
push 0x40
push dword [ebp - 0x68]
call fcn.004102b1
add esp, 8
jmp 0x406247
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.0040e5e8
lea eax, [ebp - 0x4c]
push eax
call fcn.0040f8cb
add esp, 0x20
lea ecx, [ebp - 0x80]
push 0
push 0xffffffffffffffff
push str.error
call fcn.0040e5e8
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.00403670
push 0xffffffffffffffff
lea ecx, [ebp - 0x4c]
push ecx
mov ecx, eax
call fcn.0040eaf7
mov byte [ebp - 4], 6
xor eax, eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x70], eax
test ecx, ecx
je 0x4062f1
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x70]
add esp, 4
push 2
push eax
call fcn.004102b1
mov ecx, dword [ebp - 0x78]
xor eax, eax
add esp, 8
mov dword [ebp - 0x78], eax
test ecx, ecx
je 0x406314
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x78]
add esp, 4
push 1
push eax
call fcn.004102b1
add esp, 8
call fcn.0040b5a0
add eax, 0x50
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call fcn.0040b5a0
cmp dword [eax + 0x24], 0
je 0x406360
nop dword [eax]
call fcn.0040b5a0
push 0xffffffffffffffff
lea ecx, [eax + 0x50]
add eax, 0x30
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SleepConditionVariableCS]
call fcn.0040b5a0
cmp dword [eax + 0x24], 0
jne 0x406340
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040b770
mov byte [ebp - 4], 8
call fcn.0040b5a0
mov edi, eax
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 9
push eax
lea ecx, [edi + 0x20]
call fcn.004037b0
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.00403c90
push 0x40
push dword [ebp - 0x60]
call fcn.004102b1
add esp, 8
call fcn.0040b5a0
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 0x4063de
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x3c]
add esp, 4
push 2
push eax
call fcn.004102b1
mov ecx, dword [ebp - 0x44]
xor eax, eax
add esp, 8
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x406401
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x44]
add esp, 4
push 1
push eax
call fcn.004102b1
mov eax, dword fs:[0x2c]
add esp, 8
mov ecx, dword [eax]
mov eax, dword [0x418738]
cmp eax, dword [ecx + 4]
jle 0x406456
push 0x418738
call fcn.0041042a
add esp, 4
cmp dword [0x418738], 0xffffffff
jne 0x406456
mov byte [ebp - 4], 0xa
call fcn.00405e00
push 0x418738
mov byte [0x418734], al
mov byte [ebp - 4], 1
call fcn.004103e0
add esp, 4
cmp byte [0x418734], 0
je 0x406466
mov ecx, esi
call fcn.00406580
mov eax, dword [ebp - 0x1c]
push dword [eax + 4]
lea eax, [ebp - 0x1c]
push eax
mov ecx, eax
call fcn.00403c90
push 0x40
push dword [ebp - 0x1c]
call fcn.004102b1
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 0x4064a3
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x24]
add esp, 4
push 2
push eax
call fcn.004102b1
mov ecx, dword [ebp - 0x2c]
xor eax, eax
add esp, 8
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x4064c6
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x2c]
add esp, 4
push 1
push eax
call fcn.004102b1
add esp, 8
jmp 0x405f73
call fcn.0040b5a0
add eax, 0x38
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x1c]
push dword [eax + 4]
lea eax, [ebp - 0x1c]
push eax
mov ecx, eax
call fcn.00403c90
push 0x40
push dword [ebp - 0x1c]
call fcn.004102b1
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 0x406522
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x24]
add esp, 4
push 2
push eax
call fcn.004102b1
mov ecx, dword [ebp - 0x2c]
xor eax, eax
add esp, 8
mov dword [ebp - 0x2c], eax
test ecx, ecx
je 0x406545
push ecx
call fcn.004102e3
mov eax, dword [ebp - 0x2c]
add esp, 4
push 1
push eax
call fcn.004102b1
add esp, 8
mov ecx, esi
call fcn.00406580
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00410270
mov esp, ebp
pop ebp
ret