Function at 0x40c050
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cbc60
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x504628]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0044edda
mov eax, dword [esi + 0x20]
push 0
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call fcn.004522a1
mov ebx, eax
test ebx, ebx
je 0x40c12f
call fcn.0044c7ef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c0b5
push 0x80004005
call fcn.00406bd0
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.0044d54e
test eax, eax
je 0x40c0e4
push 0x65
push eax
lea ecx, [ebp - 0x10]
call fcn.004065e0
mov edi, dword [ebp - 0x10]
cmp dword [edi - 0xc], 0
je 0x40c10c
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 0x40c12f
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov eax, dword [esi + 0x74]
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 + 0x74]
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 0x402230
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [esi + 0x20]
mov dword [0x50e884], eax
call fcn.0044c7ef
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40c193
push 0x80004005
call fcn.00406bd0
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 [0x50e888]
call fcn.004368d0
push esi
mov ebx, eax
call fcn.0041a7e0
push esi
lea ecx, [ebp - 0x18]
call fcn.0041aaf0
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40c26b
push eax
push 0x4f7630
lea edi, [ebp - 0x10]
call fcn.004067b0
mov ecx, dword [ebp - 0x10]
add esp, 8
push 0x10
add ebx, 0x18
push ebx
push ecx
mov ecx, esi
call fcn.004474df
mov ecx, edi
call fcn.00406800
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x40c25d
mov eax, dword [esi + 0x20]
push eax
call dword [sym.imp.USER32.dll_IsWindowVisible]
test eax, eax
je 0x40c21c
mov ecx, esi
call fcn.0044863f
mov ecx, esi
call fcn.0044eab1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c249
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.004235f0
push 0
call fcn.0045c60e
mov ecx, esi
call fcn.00418c40
test eax, eax
jne 0x40c287
call fcn.00423ae0
mov dword [ebp - 4], 0xffffffff
lea eax, [edi - 0x10]
jmp 0x40c230
mov eax, dword [esi + 0x78]
xor ebx, ebx
cmp eax, ebx
je 0x40c29c
push eax
call fcn.0045b48f
add esp, 4
mov dword [esi + 0x78], ebx
mov eax, dword [esi + 0x80]
mov dword [esi + 0x7c], ebx
cmp eax, ebx
je 0x40c2b8
push eax
call fcn.0043ca01
add esp, 4
mov dword [esi + 0x80], ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea ecx, [ebp - 0x14]
push ecx
push 0x4f87f0
push 0x17
push ebx
push 0x4d2d70
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40c2f3
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.004195f0
mov ecx, dword [0x50ed60]
push ebx
call fcn.004368d0
xor eax, 0x5d9507e
push eax
mov ecx, esi
call fcn.00424900
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 0x40c33a
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