Function at 0x4065fd
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54c7cc
mov eax, dword fs:[0]
push eax
sub esp, 0xd60
mov eax, dword [0x5a4e60]
xor eax, esp
mov dword [esp + 0xd58], eax
push ebx
push esi
push edi
mov eax, dword [0x5a4e60]
xor eax, esp
push eax
lea eax, [esp + 0xd70]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x20]
push eax
mov dword [esp + 0x24], esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
push esi
lea edx, [esp + 0x30]
push edx
call fcn.00415e30
xor ebx, ebx
mov dword [esp + 0xd78], ebx
call fcn.0041d189
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x406469
push 0x80004005
call fcn.00404970
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xd78], 1
push ecx
lea esi, [esp + 0x1c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.004171c0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
push edx
lea edi, [esp + 0x18]
call fcn.004175b0
mov eax, edi
push eax
lea ecx, [esp + 0x1c]
push 0x57d4ec
push ecx
call fcn.00407d40
add esp, 0xc
push 0x57d4e8
push eax
lea edx, [esp + 0x24]
push edx
mov byte [esp + 0xd84], 2
call fcn.00403c50
add esp, 0xc
push eax
mov ecx, edi
mov byte [esp + 0xd7c], 3
call fcn.004040b0
mov byte [esp + 0xd78], 2
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406511
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xd78], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406539
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
call dword [sym.imp.USER32.dll_CreatePopupMenu]
mov edi, dword [sym.imp.USER32.dll_AppendMenuW]
push 0x57d4fc
push 1
mov esi, eax
push ebx
push esi
call edi
mov ecx, dword [esp + 0x14]
push ecx
push 2
push ebx
push esi
call edi
push 0x57d50c
push 3
push ebx
push esi
call edi
push ebx
push ebx
push 0x800
push esi
call edi
push 0x57d518
push 4
push ebx
push esi
call edi
push 0x57d520
push 5
push ebx
push esi
call edi
push 0x57d594
push 6
push ebx
push esi
call edi
call fcn.00429356
cmp eax, ebx
je 0x4065a7
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
jmp 0x4065a9
xor eax, eax
mov ecx, dword [eax + 0x20]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push ebx
push ecx
push ebx
push edx
push eax
push 0x128
push esi
call dword [sym.imp.USER32.dll_TrackPopupMenu]
dec eax
cmp eax, 5
ja case.default.0x4065cf
jmp dword [eax*4 + 0x4066dc]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 0x20]
push 0x112f
push 0x74
push 0x100
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
jmp case.default.0x4065cf
mov eax, dword [esp + 0x20]
call fcn.00407690
jmp case.default.0x4065cf
push ebx
push ebx
push ebx
push 0x403750
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
mov edi, 0x57c8c8
mov edx, 0x57d548
xor ecx, ecx
call fcn.00403760
add esp, 4
jmp case.default.0x4065cf
push 1
mov ecx, 0x5ad490
call fcn.00402870
test eax, eax
jne 0x406652
push ebx
mov edi, 0x57c8c8
mov edx, 0x57d558
xor ecx, ecx
call fcn.00403760
add esp, 4
jmp case.default.0x4065cf
call fcn.004055e0
mov ebx, dword [esp + 0x20]
call fcn.004079d0
xor ebx, ebx
push esi
call dword [sym.imp.USER32.dll_DestroyMenu]
mov byte [esp + 0xd78], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406690
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0xd78], 0xffffffff
call fcn.00415fa0
mov ecx, dword [esp + 0xd70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd58]
xor ecx, esp
call fcn.00523022
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x2c]
mov ecx, eax
mov dword [0x5ad22c], eax
call fcn.0042557a
jmp case.default.0x4065cf