Function at 0x40d360
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ca410
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x63fbf0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.004589e2
mov eax, dword [esi + 0x20]
push 0
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.0045d485
mov ebx, eax
test ebx, ebx
je 0x40d43f
call fcn.0045590c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d3c5
push 0x80004005
call fcn.00406d40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
push 0x65
mov dword [ebp - 4], 0
call fcn.00456e27
test eax, eax
je 0x40d3f4
push 0x65
push eax
lea ecx, [ebp - 0x10]
call fcn.00406700
mov edi, dword [ebp - 0x10]
cmp dword [edi - 0xc], 0
je 0x40d41c
mov ecx, dword [ebx + 4]
push 0
push 0
push 0x800
push ecx
call dword [sym.imp.USER32.dll_AppendMenuW]
mov edx, dword [ebx + 4]
push edi
push 0x10
push 0
push edx
call dword [sym.imp.USER32.dll_AppendMenuW]
add edi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d43f
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, dword [esi + 0x94]
mov ecx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
push 1
push 0x80
push ecx
call edi
mov eax, dword [esi + 0x94]
mov edx, dword [esi + 0x20]
push eax
push 0
push 0x80
push edx
call edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
push 0x4023e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [esi + 0x20]
mov dword [0x64d970], eax
call fcn.0045590c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d4a9
push 0x80004005
call fcn.00406d40
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 1
mov ecx, dword [0x64d974]
call fcn.0043efa0
push esi
mov ebx, eax
call fcn.0041d9b0
lea ecx, [ebp - 0x18]
push ecx
mov ecx, esi
call fcn.0041dcc0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40d583
push eax
push 0x61bfc8
lea edi, [ebp - 0x10]
call fcn.00406950
mov edx, dword [ebp - 0x10]
add esp, 8
push 0x10
add ebx, 0x18
push ebx
push edx
mov ecx, esi
call fcn.00450032
mov ecx, edi
call fcn.00406970
mov eax, dword [esi + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d575
mov ecx, dword [esi + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40d534
mov ecx, esi
call fcn.00450ac7
mov ecx, esi
call fcn.0045868a
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d561
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
call fcn.004261c0
push 0
call fcn.00547091
mov ecx, esi
call fcn.0041bdb0
test eax, eax
jne 0x40d5d1
mov ecx, dword [esi + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40d575
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40d5b1
mov ecx, esi
call fcn.00450ac7
mov ecx, esi
call fcn.0045868a
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40d555
mov eax, dword [esi + 0x98]
xor ebx, ebx
cmp eax, ebx
je 0x40d5ec
push eax
call fcn.00545dfd
add esp, 4
mov dword [esi + 0x98], ebx
mov eax, dword [esi + 0xa0]
mov dword [esi + 0x9c], ebx
cmp eax, ebx
je 0x40d60b
push eax
call fcn.00445171
add esp, 4
mov dword [esi + 0xa0], ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea ecx, [ebp - 0x14]
push ecx
push 0x61d8ac
push 0x17
push ebx
push 0x5f7390
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40d646
mov edx, dword [eax]
push eax
mov eax, dword [edx + 0x38]
call eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
call fcn.0041c720
mov ecx, dword [0x64de4c]
push ebx
call fcn.0043efa0
xor eax, 0x5d9507e
push eax
mov ecx, esi
call fcn.004271f0
lea eax, [edi - 0x10]
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d68d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret