Function at 0x502114
Capabilities:
Set global application hook

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x120], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x11c], ebx
test dl, dl
je 0x50213c
add esp, 0xfffffff0
call fcn.00403db0
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5025e1
push dword fs:[eax]
mov dword fs:[eax], esp
mov ecx, dword [ebp - 4]
mov dl, 1
mov eax, dword [0x4fcee4]
call fcn.004fe870
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x80], ebx
mov eax, dword [ebp - 4]
mov dword [ebx + 0xf4], eax
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [ebx + 0xf0], eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0xec], eax
mov eax, dword [eax]
mov eax, dword [eax + 0x38]
mov dword [ebx + 0xe8], eax
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 4]
mov dword [ebx + 0xdc], eax
mov eax, dword [ebp - 4]
mov byte [eax + 0x86], 1
mov eax, dword [ebp - 4]
mov dword [eax + 0xa0], 0x8000000d
mov eax, dword [ebp - 4]
mov word [eax + 0x84], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x70], 0
mov ecx, dword [ebp - 0xc]
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00456690
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd624]
call fcn.00403bb4
test al, al
je 0x502335
mov eax, dword [ebp - 0xc]
mov edx, dword [0x43a670]
call fcn.00403bb4
test al, al
je 0x502335
mov eax, dword [ebp - 0xc]
call fcn.0041f96c
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x502335
inc ebx
mov dword [ebp - 0x14], 0
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
mov edx, dword [0x44fe34]
call fcn.00403bb4
test al, al
je 0x5022fd
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
mov edx, dword [0x44fe34]
call fcn.00403bcc
mov eax, dword [eax + 0x3c]
mov edx, dword [0x43aef4]
call fcn.00403bcc
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.00503780
xor eax, eax
push ebp
push 0x5022f6
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
mov edx, dword [0x44fe34]
call fcn.00403bcc
mov eax, dword [eax + 0x28]
call fcn.004531f8
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x5022d8
inc ebx
xor esi, esi
push ebp
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
mov edx, dword [0x44fe34]
call fcn.00403bcc
mov eax, dword [eax + 0x28]
mov edx, esi
call fcn.00453224
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x80]
call fcn.00501f6c
pop ecx
inc esi
dec ebx
jne 0x5022a2
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x502335
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
call fcn.00403a14
ret
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
mov edx, dword [0x4fd624]
call fcn.00403bb4
test al, al
je 0x50232b
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
call fcn.0041f92c
cmp eax, dword [ebp - 4]
je 0x50232b
mov byte [ebp - 0xd], 1
inc dword [ebp - 0x14]
dec ebx
jne 0x502220
mov eax, dword [ebp - 4]
mov byte [eax + 0x68], 1
mov dl, 1
mov eax, dword [0x44dae8]
call fcn.004039b8
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x98], ebx
mov eax, dword [ebp - 4]
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], 0x5037a4
mov dl, 1
mov eax, dword [0x420b70]
call fcn.004222e4
mov edx, dword [ebp - 4]
mov dword [edx + 0x90], eax
mov dl, 1
mov eax, dword [0x420b70]
call fcn.004222e4
mov edx, dword [ebp - 4]
mov dword [edx + 0x9c], eax
mov dl, 1
mov eax, dword [0x420b70]
call fcn.004222e4
mov edx, dword [ebp - 4]
mov dword [edx + 0xa4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x90]
mov edx, dword [ebp - 4]
mov dword [eax + 0xc], edx
mov dword [eax + 8], 0x5026d8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x9c]
mov edx, dword [ebp - 4]
mov dword [eax + 0xc], edx
mov dword [eax + 8], 0x5026d8
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xa4]
mov edx, dword [ebp - 4]
mov dword [eax + 0xc], edx
mov dword [eax + 8], 0x5026d8
mov eax, dword [ebp - 4]
test byte [eax + 0x20], 0x10
je 0x502423
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x9c]
mov edx, 0x8000000e
call fcn.00422504
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xa4]
mov edx, 0x502614
call fcn.0042277c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xa4]
mov edx, 7
call fcn.0042280c
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd624]
call fcn.00403bb4
test al, al
jne 0x502447
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd82c]
call fcn.00403bb4
test al, al
je 0x5024b0
mov eax, dword [ebp - 0xc]
mov edx, dword [0x43a670]
call fcn.00403bb4
test al, al
jne 0x5024b0
lea edx, [ebp - 0x118]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00403934
lea edx, [ebp - 0x118]
lea eax, [ebp - 0x18]
call fcn.00404b08
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x11c]
mov eax, dword [0x57f2cc]
call fcn.00406ee4
mov edx, dword [ebp - 0x11c]
pop eax
call fcn.00404b6c
mov ecx, dword [ebp - 0x18]
mov dl, 1
mov eax, dword [0x4fc7e4]
call fcn.0040e378
call fcn.00404208
jmp 0x5025bb
mov eax, dword [ebp - 4]
call fcn.00502620
mov edx, eax
mov eax, dword [ebp - 4]
call fcn.00503730
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd624]
call fcn.00403bb4
test al, al
jne 0x5024ea
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd82c]
call fcn.00403bb4
test al, al
jne 0x5024ea
xor eax, eax
jmp 0x5024ec
mov al, 1
push eax
mov eax, dword [0x57f0d0]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.004fc4fc
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x6c], ebx
mov eax, dword [ebp - 4]
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x10], fcn.004fdbf8
mov eax, dword [ebp - 4]
mov dword [ebx + 0x24], eax
mov dword [ebx + 0x20], fcn.004fdd08
mov eax, dword [ebp - 4]
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x18], 0x502e10
cmp byte [ebp - 0xd], 0
jne 0x502594
mov eax, dword [ebp - 4]
mov edx, dword [0x4fd714]
call fcn.00403bb4
test al, al
jne 0x50254e
mov eax, dword [ebp - 4]
call fcn.00502760
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
test byte [eax + 0x20], 0x10
jne 0x5025bb
cmp dword [0x57e660], 0
jne 0x502581
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
push 0x501e88
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x57e660], eax
cmp dword [0x57e65c], 0
jne 0x5025bb
mov eax, dword [ebp - 4]
mov dword [0x57e65c], eax
jmp 0x5025bb
lea edx, [ebp - 0x120]
mov eax, dword [0x57ed34]
call fcn.00406ee4
mov ecx, dword [ebp - 0x120]
mov dl, 1
mov eax, dword [0x4fc7e4]
call fcn.0040e378
call fcn.00404208
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5025e8
lea eax, [ebp - 0x120]
mov edx, 2
call fcn.004048e0
lea eax, [ebp - 0x18]
call fcn.004048bc
ret