Function at 0x5186c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
xor ebx, ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x518c3e
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.005175b0
test al, al
jne 0x51873e
lea eax, [ebp - 0x34]
push eax
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00404e34
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0x11
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp - 0x44]
mov eax, dword [0x5a4ddc]
call fcn.0040a488
mov eax, dword [ebp - 0x44]
xor ecx, ecx
pop edx
call fcn.00415b1c
mov edx, dword [ebp - 0x34]
mov eax, 3
call fcn.00517418
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x14]
cmp eax, 8
ja case.default.0x51875a
jmp dword [eax*4 + 0x518761]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
je 0x5187ba
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.0040445c
jmp 0x5187ba
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x51879d
cmp dword [ebp + 8], 0
jle case.default.0x51875a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov ecx, dword [ebp + 8]
call fcn.0040445c
jmp case.default.0x51875a
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
je 0x51881a
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x20], eax
jmp 0x518887
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
call fcn.00515ac0
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
call fcn.00515ac0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x51882e
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x34]
je 0x5188b1
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
cmp dword [ebp + 8], 0
jle case.default.0x51875a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.00515ac0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.00515ac0
jmp case.default.0x51875a
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.0040445c
mov eax, dword [ebp + 8]
dec eax
test eax, eax
jl case.default.0x51875a
inc eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], 0
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x40]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jne 0x5189b5
xor eax, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 0x28]
cmp byte [eax + edx], 0xff
jae 0x518972
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 0x28]
inc byte [eax + edx]
jmp 0x518988
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
mov edx, dword [ebp - 0x28]
mov byte [eax + edx], 0
inc dword [ebp - 0x28]
cmp dword [ebp - 0x28], 8
jne 0x518955
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x44]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x48]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x44]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 0x40], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
inc dword [eax + 0x40]
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
mov al, byte [eax + edx]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x44]
mov ecx, dword [ebp - 0x2c]
xor al, byte [edx + ecx]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
mov byte [edx + ecx], al
inc dword [ebp - 0x24]
dec dword [ebp - 0x30]
jne 0x51893d
jmp case.default.0x51875a
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
je 0x518a09
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x20], eax
jmp 0x518a72
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x30]
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
call fcn.00515ac0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
add dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x24]
jge 0x518a1d
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x34]
je 0x518a9c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
cmp dword [ebp + 8], 0
jle case.default.0x51875a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 0x18]
call fcn.00515ac0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
push eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2c]
call fcn.00515ac0
jmp case.default.0x51875a
cmp dword [ebp + 8], 0
jle case.default.0x51875a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
inc eax
call fcn.0040445c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24]
mov ecx, dword [ebp - 0x14]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0x18]
mov byte [edx], al
inc dword [ebp - 0x18]
inc dword [ebp - 0x14]
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x518b0d
jmp case.default.0x51875a
cmp dword [ebp + 8], 0
jle case.default.0x51875a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x24]
call fcn.0040445c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x2c]
xor al, byte [edx]
mov edx, dword [ebp - 0x18]
mov byte [edx], al
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x24]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
inc eax
call fcn.0040445c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x24]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0x2c]
mov cl, byte [ecx]
mov byte [eax + edx - 1], cl
inc dword [ebp - 0x18]
inc dword [ebp - 0x14]
dec dword [ebp + 8]
cmp dword [ebp + 8], 0
jg 0x518b90
jmp case.default.0x51875a
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00517ff8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x518c45
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.00406d80
lea eax, [ebp - 0x34]
call fcn.00406d78
ret