Function at 0x804dd4
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x848a9c
mov eax, dword fs:[0]
push eax
sub esp, 0x190
push ebx
push ebp
push esi
push edi
mov eax, dword [0x85f690]
xor eax, esp
push eax
lea eax, [esp + 0x1a4]
mov dword fs:[0], eax
mov esi, dword [esp + 0x1b4]
mov eax, dword [esi + 0x20]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
push esi
lea edx, [esp + 0x2c]
push edx
call fcn.0080be90
xor esi, esi
mov dword [esp + 0x1ac], esi
call fcn.00814403
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x804c57
push 0x80004005
call fcn.008020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x1ac], 1
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
lea ebx, [esp + 0x14]
lea esi, [esp + 0x1c]
call fcn.0080cd50
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x18]
lea edi, [esp + 0x1c]
call fcn.0080d0e0
mov edx, edi
push edx
lea eax, [esp + 0x20]
push 0x851860
push eax
call fcn.00805200
push 0x85185c
push eax
lea ecx, [esp + 0x28]
mov ebx, 2
push ecx
mov byte [esp + 0x1c4], bl
call fcn.008028e0
add esp, 0x18
push eax
mov ecx, edi
mov byte [esp + 0x1b0], 3
call fcn.00802170
mov byte [esp + 0x1ac], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x804cfe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1ac], 1
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 0x804d26
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 esi, dword [sym.imp.USER32.dll_AppendMenuW]
push 0x851870
push 1
mov edi, eax
push 0
push edi
call esi
mov ebp, dword [esp + 0x18]
push ebp
push ebx
push 0
push edi
call esi
push 0x851880
push 3
push 0
push edi
call esi
push 0
push 0
push 0x800
push edi
call esi
push 0x85188c
push 5
push 0
push edi
call esi
push 0x8518c4
push 6
push 0
push edi
call esi
call fcn.00813074
test eax, eax
je 0x804d8f
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
jmp 0x804d91
xor eax, eax
mov ecx, dword [eax + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push 0
push ecx
push 0
push edx
push eax
push 0x128
push edi
call dword [sym.imp.USER32.dll_TrackPopupMenu]
dec eax
cmp eax, 5
ja case.0x804db5.4
jmp dword [eax*4 + 0x804e7c]
call fcn.00801b80
jmp case.0x804db5.4
mov ecx, dword [esp + 0x1b4]
push 0
push ecx
call fcn.008049e0
jmp case.0x804db5.4
push 0
push 0
push 0
push 0x803bd0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x1b4]
push 0
push 0x851374
push 0x8518b4
call fcn.00815b61
jmp case.0x804db5.4
lea ecx, [esp + 0x28]
call fcn.0081c9ca
jmp case.0x804db5.4
mov esi, dword [esp + 0x1b4]
call fcn.00804ea0
push edi
call dword [sym.imp.USER32.dll_DestroyMenu]
lea eax, [ebp - 0x10]
mov byte [esp + 0x1ac], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x804e4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x28]
mov dword [esp + 0x1ac], 0xffffffff
call fcn.0080bf70
mov ecx, dword [esp + 0x1a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x19c
ret 4