Function at 0x516b60
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x60
mov edx, dword [0x719600]
mov ecx, dword [0x71d0d4]
push ebx
xor ebx, ebx
cmp edx, ebx
sete al
cmp ecx, ebx
mov byte [esp + 0x28], al
mov eax, dword [0x71d0d0]
sete cl
cmp eax, ebx
push esi
mov byte [esp + 0xb], 1
mov dword [esp + 0xc], ebx
mov dword [esp + 0x20], 0x320
mov dword [esp + 0x24], 0x258
mov dword [esp + 0x28], 0x3c
mov dword [0x71d09c], ebx
mov byte [0x71d094], cl
je 0x516bbd
mov byte [0x71d094], bl
cmp dword [0x719618], ebx
jne 0x516be5
cmp dword [0x71961c], ebx
jne 0x516be5
cmp dword [0x722ad4], 0x3e8
jbe 0x516be5
cmp dword [0x722ad0], 0x80
ja 0x516bf5
mov dword [esp + 0x20], 0x280
mov dword [esp + 0x24], 0x1e0
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x28]
push eax
lea esi, [esp + 0x28]
call fcn.00516a60
mov eax, dword [esp + 0x2c]
mov byte [0x69c699], bl
mov byte [0x69c69a], bl
mov byte [0x69c698], bl
mov ebx, dword [esp + 0x28]
add esp, 8
call fcn.00515ad0
test al, al
je 0x516c6c
mov eax, dword [0x721dc0]
mov ecx, dword [0x7460e4]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x18], ecx
je 0x516c4a
mov dword [0x71d0a0], eax
jmp 0x516c5b
push 0x1f
call dword [0x746194]
cmp eax, ebx
mov dword [0x71d0a0], eax
je 0x516c6c
mov edx, dword [eax]
push eax
call dword [edx + 0x10]
mov esi, eax
cmp esi, 1
mov dword [esp + 0x1c], esi
jae 0x516c74
pop esi
xor al, al
pop ebx
add esp, 0x60
ret
mov al, byte [0x71d094]
test al, al
push edi
je 0x516cbb
push str._adapter
lea edi, [esp + 0x1c]
call fcn.00542ae0
add esp, 4
test al, al
je 0x516cbb
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push eax
push 0x65fb80
push ecx
call fcn.006267c2
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, esi
jbe 0x516cbf
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x60
ret
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], 0xffffffff
mov ecx, dword [esp + 0x14]
push ebp
mov ebp, dword [esp + 0x24]
cmp ecx, 0xffffffff
je 0x516d7c
cmp ecx, dword [esp + 0x24]
jae 0x51738e
mov ebp, ecx
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516d1a
mov edx, dword [0x721db8]
mov eax, dword [edx + esi*4]
cmp byte [eax], 0x2d
jne 0x516d10
push eax
push str._useref
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516d8c
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516cf0
mov ecx, 1
mov eax, dword [0x71d0a0]
mov edx, dword [eax]
push 0x7c0c60
push ecx
push ebp
push eax
mov dword [0x69c6b0], ecx
call dword [edx + 0x38]
mov edx, dword [0x71d0a0]
mov ecx, ebp
call fcn.0057d820
cmp eax, ebx
je 0x516d54
push ebx
push eax
push 0xffffffffffffffff
call fcn.0057eea0
add esp, 0xc
mov eax, dword [0x722a8c]
or edi, 0xffffffff
cmp eax, ebx
je 0x516dac
cmp eax, 0x270f
je 0x516daa
cmp eax, 0x270d
je 0x516daa
cmp eax, 0x270e
jne 0x516d93
mov edi, 0xffff0200
jmp 0x516dac
cmp eax, ebx
je 0x517349
lea ebp, [eax - 1]
jmp 0x516ce5
mov ecx, 2
jmp 0x516d1f
xor edx, edx
mov ecx, 0xa
div ecx
or eax, 0xffffff00
shl eax, 8
or eax, edx
mov edi, eax
jmp 0x516dac
xor edi, edi
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516dea
jmp 0x516dc0
mov edx, dword [0x721db8]
mov eax, dword [edx + esi*4]
cmp byte [eax], 0x2d
jne 0x516de0
push eax
push str._useff
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516e02
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516dc0
cmp dword [0x71961c], ebx
jne 0x516e02
cmp dword [0x722a88], ebx
jne 0x516e02
cmp dword [0x722a5c], ebx
je 0x516e0a
mov dword [0x722a8c], ebx
xor edi, edi
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516e52
mov eax, dword [0x721db8]
mov eax, dword [eax + esi*4]
cmp byte [eax], 0x2d
jne 0x516e34
push eax
push str._use00
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516e40
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516e15
jmp 0x516e52
mov dword [0x722a8c], ebx
xor edi, edi
mov dword [0x7c0d1c], 1
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516e97
lea ecx, [ecx]
mov ecx, dword [0x721db8]
mov eax, dword [ecx + esi*4]
cmp byte [eax], 0x2d
jne 0x516e80
push eax
push str._use11
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516e8c
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516e60
jmp 0x516e97
mov dword [0x722a8c], ebx
mov edi, 0xffff0101
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516ed9
mov edx, dword [0x721db8]
mov eax, dword [edx + esi*4]
cmp byte [eax], 0x2d
jne 0x516ec2
push eax
push str._use14
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516ece
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516ea2
jmp 0x516ed9
mov dword [0x722a8c], ebx
mov edi, 0xffff0104
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516f1a
mov eax, dword [0x721db8]
mov eax, dword [eax + esi*4]
cmp byte [eax], 0x2d
jne 0x516f03
push eax
push str._use20
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x516f0f
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516ee4
jmp 0x516f1a
mov dword [0x722a8c], ebx
mov edi, 0xffff0200
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x516f5e
jmp 0x516f30
mov ecx, dword [0x721db8]
mov eax, dword [ecx + esi*4]
cmp byte [eax], 0x2d
jne 0x516f54
push eax
push str._use2a
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x517086
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x516f30
cmp edi, 0xffffffff
je 0x516f80
mov edx, dword [0x7c0d2c]
mov eax, edi
and edx, 0xffff
and eax, 0xffff
cmp edx, eax
jbe 0x516f80
mov dword [0x7c0d2c], edi
cmp dword [0x722a68], ebx
je 0x516f98
push ebx
push 0x70
push 0x93
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a64], ebx
je 0x516fad
push ebx
push 0x70
push 0x67
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a74], ebx
je 0x516fca
cmp dword [0x722a64], ebx
jne 0x516fca
push ebx
push 0x72
push 0x69
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a6c], ebx
je 0x516fef
cmp dword [0x722a74], ebx
jne 0x516fef
cmp dword [0x722a64], ebx
jne 0x516fef
push ebx
push 0x71
push 0x68
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a78], ebx
je 0x517007
push ebx
push 0x72
push 0x8f
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a70], ebx
je 0x517027
cmp dword [0x722a78], ebx
jne 0x517027
push ebx
push 0x71
push 0x8e
call fcn.0057eea0
add esp, 0xc
cmp dword [0x722a98], ebx
je 0x51703d
mov byte [0x69c699], 1
mov byte [0x69c69a], 1
cmp dword [0x722a9c], ebx
je 0x51704c
mov byte [0x69c69a], 1
mov eax, dword [0x722ac4]
cmp eax, 0x1002
jne 0x517096
mov eax, dword [0x722ac0]
cmp eax, 0x514c
je 0x51707d
cmp eax, 0x514e
je 0x51707d
cmp eax, 0x514f
je 0x51707d
cmp eax, 0x4242
jne 0x5170fd
mov byte [0x69c698], 1
jmp 0x5170fd
mov dword [0x722a8c], ebx
mov edi, 0xffff0200
jmp 0x516f63
cmp eax, 0x10de
jne 0x5170fd
push str.NVCPL.dll
mov byte [0x69c698], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
je 0x5170fd
push str.NvCplGetDataInt
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x5170f6
lea ecx, [esp + 0x1c]
push ecx
push 4
mov dword [esp + 0x24], ebx
call eax
add esp, 8
test eax, eax
je 0x5170f6
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x5170f6
cmp eax, ebx
je 0x5170f6
push ebx
push 0x7e
push 0x8d
call fcn.0057eea0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edx, dword [0x6efef0]
mov eax, dword [0x722ad8]
shl edx, 0x14
cmp eax, edx
jae 0x51711c
push ebx
push 0x75
push 0x6c
call fcn.0057eea0
add esp, 0xc
mov edi, dword [sym.imp.USER32.dll_GetDesktopWindow]
call edi
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
mov al, byte [0x71d094]
test al, al
jne 0x517155
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, 0x20
je 0x517155
push 1
push 0x7e
push 0x83
call fcn.0057eea0
add esp, 0xc
push esi
call edi
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [0x71d0a0]
mov ecx, dword [eax]
lea edx, [esp + 0x38]
push edx
push ebp
push eax
call dword [ecx + 0x20]
test eax, eax
jl 0x517353
mov al, byte [0x71d094]
test al, al
je 0x51719c
mov eax, dword [esp + 0x20]
push 0x90080000
push 0xfffffffffffffff0
push eax
call dword [sym.imp.USER32.dll_SetWindowLongA]
mov al, byte [0x71d094]
test al, al
jne 0x5171ff
lea ecx, [esp + 0x58]
push ecx
call edi
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x64]
cmp dword [esp + 0x2c], eax
jae 0x5171be
mov edx, dword [esp + 0x28]
cmp edx, dword [esp + 0x60]
jb 0x5171e7
cmp eax, 0x258
jle 0x5171d7
mov dword [esp + 0x28], 0x320
mov dword [esp + 0x2c], 0x258
jmp 0x5171e7
mov dword [esp + 0x28], 0x280
mov dword [esp + 0x2c], 0x1e0
mov eax, dword [esp + 0x44]
cmp eax, 0x15
jl 0x5171fa
cmp eax, 0x16
mov byte [esp + 0x13], 1
jle 0x5171ff
mov byte [esp + 0x13], 0
push 0x7c03c0
lea eax, [esp + 0x2c]
call fcn.00516160
mov dword [esp + 0x58], 0x20
mov eax, dword [0x7c0d2c]
add esp, 4
cmp eax, 0xffff0101
setb al
mov cl, al
neg cl
mov dl, al
sbb ecx, ecx
and ecx, 0x40
add ecx, 0x40
neg dl
mov dword [esp + 0x48], ecx
sbb edx, edx
and edx, 0xffffffe0
add edx, 0x40
neg al
mov dword [esp + 0x4c], edx
sbb eax, eax
xor esi, esi
mov si, word [0x7c0c7e]
and eax, 0xffffffa0
add eax, 0x80
mov dword [esp + 0x50], eax
not esi
and esi, 1
cmp esi, 4
jge 0x5172d1
jmp 0x517270
mov edx, dword [0x722a60]
mov edi, dword [esp + esi*4 + 0x48]
neg edx
sbb edx, edx
and edx, 0x100
add edi, edx
mov edx, dword [0x71d0cc]
mov eax, dword [0x71d0a0]
neg edx
sbb edx, edx
mov ecx, dword [eax]
and edx, 2
add edi, edx
mov edx, dword [0x71d0d0]
neg edx
push 0x71d09c
sbb edx, edx
push 0x7c03c0
and edx, 4
add edi, edx
mov edx, dword [esp + 0x28]
push edi
push edx
mov edx, dword [0x69c6b0]
push edx
push ebp
push eax
call dword [ecx + 0x40]
test eax, eax
jge 0x5172f4
inc esi
cmp esi, 4
jl 0x517270
mov al, byte [0x71d098]
test al, al
jne 0x517301
push 0x7c03c0
lea eax, [esp + 0x2c]
mov byte [0x71d098], 1
call fcn.00516160
jmp 0x517215
mov al, byte [esp + esi*4 + 0x48]
and al, 0x20
mov byte [0x69c690], al
jmp 0x51730e
cmp dword [esp + 0x30], ebx
sete cl
mov byte [0x71d098], cl
cmp dword [0x71d0cc], ebx
je 0x517325
mov dword [esp + 0x1c], 0x7e
wait
fninit
fldcw word [esp + 0x1c]
mov al, byte [esp + 0x13]
test al, al
je 0x517335
cmp dword [0x71d09c], ebx
jne 0x51735a
cmp dword [esp + 0x24], 1
jbe 0x51735a
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x13], 1
inc ecx
mov dword [esp + 0x18], ecx
jmp 0x516cd0
mov byte [esp + 0x13], 0
jmp 0x51738e
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
mov dword [0x7c0d90], edx
mov edx, dword [esp + 0x44]
mov dword [0x7c0d94], eax
mov eax, dword [esp + 0x2c]
mov dword [0x7c0d98], ecx
mov ecx, dword [esp + 0x28]
mov dword [0x7c0d9c], edx
call fcn.00515cc0
cmp dword [0x71d09c], ebx
je 0x5175f6
mov al, byte [esp + 0x13]
test al, al
je 0x5175f6
mov eax, dword [0x7c0cf8]
mov edx, dword [0x69c6b0]
push 0x15
cmp eax, 4
push 1
sbb eax, eax
push 1
and eax, 0xfffffffe
push 0x16
add eax, 4
push edx
mov word [0x69c692], ax
mov eax, dword [0x71d0a0]
mov ecx, dword [eax]
push ebp
push eax
mov dword [0x71d0a8], ebp
mov word [0x69c68e], 0x2c
call dword [ecx + 0x28]
test eax, eax
jge 0x5173f1
mov byte [0x69c69a], 1
mov al, byte [0x71d094]
test al, al
je 0x517409
cmp dword [0x71d09c], ebx
je 0x517409
push ebx
call dword [sym.imp.USER32.dll_ShowCursor]
mov byte [0x7c0c40], 0
mov byte [0x71d096], 0
call fcn.00516270
cmp dword [0x71d0d0], ebx
jne 0x51742e
mov eax, 1
call fcn.00515980
cmp dword [0x7c0d2c], 0xffff0101
jae 0x51745c
mov ax, word [0x69c692]
cmp ax, 2
mov word [0x69c692], ax
jl 0x517455
mov word [0x69c692], 2
mov byte [0x69c698], 1
mov eax, dword [0x721dbc]
xor esi, esi
cmp eax, ebx
jle 0x5174a2
jmp 0x517470
mov eax, dword [0x721db8]
mov eax, dword [eax + esi*4]
cmp byte [eax], 0x2d
jne 0x51748f
push eax
push str._usefxfile
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x51749b
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x517470
jmp 0x5174a2
mov byte [0x71d0b6], 1
call fcn.005169b0
call fcn.00530240
test al, al
je 0x5174ff
push 0x18000
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [0x71d064], eax
je 0x5174ff
call fcn.0051bd00
test al, al
je 0x5174ff
call fcn.00515360
test al, al
je 0x5174ff
call fcn.005149c0
test al, al
je 0x5174ff
call fcn.0051b4e0
test al, al
je 0x5174ff
call fcn.0052cb90
test al, al
je 0x5174ff
call fcn.005370e0
test al, al
je 0x5174ff
mov bl, 1
jmp 0x517501
xor bl, bl
call fcn.00522690
mov eax, dword [0x6e2cf4]
mov ecx, dword [0x6e2cf0]
lea edi, [eax + ecx]
add eax, 0x78
mov dword [0x6e2cf4], eax
mov al, byte [0x719c00]
test al, al
mov dword [esp + 0x24], 0x78
lea esi, [esp + 0x24]
jne 0x517542
mov edx, 0x6b7a28
call fcn.004d0370
mov byte [0x719c00], 1
mov eax, dword [0x6e2cfc]
mov edx, 4
lea esp, [esp]
xor ecx, ecx
mov cl, byte [esi]
xor ecx, eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x6b7a28]
shr eax, 8
inc esi
xor eax, ecx
dec edx
jne 0x517550
mov dword [0x6e2cfc], eax
mov dword [0x71ceec], edi
call fcn.004445f0
call fcn.005176b0
test al, al
je 0x51758a
call fcn.00517d40
test bl, bl
je 0x5175e7
mov edx, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], eax
mov eax, dword [0x71d09c]
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0x3f800000
mov ecx, dword [eax]
push eax
call dword [ecx + 0xbc]
test eax, eax
jge 0x5175d1
xor bl, bl
mov byte [0x69c640], 1
call fcn.00519820
pop ebp
pop edi
pop esi
mov al, bl
pop ebx
add esp, 0x60
ret
call fcn.00518600
pop ebp
pop edi
pop esi
mov al, bl
pop ebx
add esp, 0x60
ret
push 1
push 0x82
push 0x81
mov dword [0x71d09c], ebx
call fcn.0057eea0
add esp, 0xc
pop ebp
pop edi
pop esi
xor al, al
pop ebx
add esp, 0x60
ret