Function at 0x10054df0
Capabilities:
Encode data using xor
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a8
push ebx
push esi
push edi
push dword [0x100c7608]
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x4c], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x10055229
push 0x480
lea eax, [ebp - 0x5a4]
push 0
push eax
call fcn.1007cff0
push 0x44
lea eax, [ebp - 0x9c]
push 0
push eax
call fcn.1007cff0
add esp, 0x18
mov ecx, esi
mov edx, edi
mov eax, dword [ecx]
lea ecx, [ecx + 4]
inc dword [ebp + eax*4 - 0x9c]
sub edx, 1
jne 0x10054e44
cmp dword [ebp - 0x9c], edi
jne 0x10054e79
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
mov eax, dword [ebp + 0x18]
mov dword [eax], edx
cmp edi, 1
jne 0x10055229
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x18]
mov ecx, 1
mov ebx, dword [edx]
mov dword [ebp - 0x14], ebx
cmp dword [ebp + ecx*4 - 0x9c], 0
jne 0x10054e96
inc ecx
cmp ecx, 0x10
jbe 0x10054e86
mov dword [ebp - 8], ecx
cmp ebx, ecx
jae 0x10054ea2
mov ebx, ecx
mov dword [ebp - 0x14], ebx
mov eax, 0x10
jmp 0x10054eb0
cmp dword [ebp + eax*4 - 0x9c], 0
jne 0x10054ebf
sub eax, 1
jne 0x10054eb0
mov dword [ebp - 0x2c], eax
cmp ebx, eax
jbe 0x10054ecb
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov dword [edx], ebx
mov edx, 1
shl edx, cl
cmp ecx, eax
jae 0x10054ef0
jmp 0x10054ee0
sub edx, dword [ebp + ecx*4 - 0x9c]
js 0x10054efe
inc ecx
add edx, edx
cmp ecx, eax
jb 0x10054ee0
mov ecx, edx
sub edx, dword [ebp + eax*4 - 0x9c]
mov dword [ebp - 0x50], edx
jns 0x10054f0a
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
mov dword [ebp + eax*4 - 0x9c], ecx
mov dword [ebp - 0xe0], edx
sub eax, 1
je 0x10054f36
xor ecx, ecx
add edx, dword [ebp + ecx - 0x98]
lea ecx, [ecx + 4]
mov dword [ebp + ecx - 0xe0], edx
sub eax, 1
jne 0x10054f20
xor ecx, ecx
mov edx, dword [esi]
lea esi, [esi + 4]
test edx, edx
je 0x10054f57
mov eax, dword [ebp + edx*4 - 0xe4]
mov dword [ebp + eax*4 - 0x5a4], ecx
inc eax
mov dword [ebp + edx*4 - 0xe4], eax
inc ecx
cmp ecx, edi
jb 0x10054f38
xor edi, edi
lea eax, [ebp - 0x5a4]
mov edx, ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 8]
or ecx, 0xffffffff
neg edx
mov dword [ebp - 0x30], edi
xor esi, esi
mov dword [ebp - 0xe4], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x124], edi
mov dword [ebp - 0x40], edi
cmp eax, dword [ebp - 0x2c]
jg 0x10055215
mov edi, dword [ebp + 0x14]
lea ecx, [ebp - 0x9c]
lea ecx, [ecx + eax*4]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x28], ecx
mov edi, esi
mov ecx, dword [ecx]
test ecx, ecx
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0xc]
je 0x100551cf
mov eax, dword [ebp - 0x24]
jmp 0x10054fc0
mov dword [ebp - 0x44], eax
dec eax
mov dword [ebp - 0x24], eax
lea eax, [edx + ebx]
cmp dword [ebp - 8], eax
jle 0x100550c7
mov eax, edx
sub eax, ebx
mov esi, dword [ebp - 0x2c]
add edx, ebx
inc ecx
mov dword [ebp - 0x20], edx
add eax, ebx
mov dword [ebp - 0xc], ecx
sub esi, edx
mov dword [ebp - 0x3c], eax
cmp esi, ebx
jbe 0x10054ff0
mov esi, ebx
mov ebx, dword [ebp - 8]
mov eax, 1
sub ebx, edx
mov ecx, ebx
shl eax, cl
cmp eax, dword [ebp - 0x44]
jbe 0x10055026
mov edx, dword [ebp - 0x28]
or ecx, 0xffffffff
sub ecx, dword [ebp - 0x24]
inc ebx
add eax, ecx
cmp ebx, esi
jae 0x10055026
mov ecx, dword [edx + 4]
lea edx, [edx + 4]
add eax, eax
cmp eax, ecx
jbe 0x10055026
inc ebx
sub eax, ecx
cmp ebx, esi
jb 0x10055013
mov ecx, ebx
mov esi, 1
shl esi, cl
lea eax, [esi*8 + 8]
push eax
call fcn.1008680d
add esp, 4
test eax, eax
je 0x100551e4
mov edx, dword [ebp - 0x48]
lea ecx, [esi + 1]
add dword [edx + 0x1b434], ecx
lea ecx, [eax + 8]
mov edx, dword [ebp - 0x38]
add eax, 4
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x40], ecx
mov dword [edx], ecx
lea edx, [ebp - 0x124]
mov dword [eax], 0
mov eax, dword [ebp - 0xc]
mov dword [edx + eax*4], ecx
lea edx, [edx + eax*4]
mov dword [ebp - 0x34], edx
test eax, eax
je 0x100550af
mov dword [ebp + eax*4 - 0xe4], edi
add bl, 0x10
mov eax, dword [ebp - 0x14]
mov edx, edi
mov byte [ebp - 0x1b], al
mov eax, dword [ebp - 0x34]
mov byte [ebp - 0x1c], bl
mov ebx, ecx
mov ecx, dword [ebp - 0x3c]
shr edx, cl
mov eax, dword [eax - 4]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov dword [eax + edx*8], ecx
mov dword [eax + edx*8 + 4], ebx
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
lea eax, [edx + ebx]
cmp dword [ebp - 8], eax
mov eax, dword [ebp - 0x3c]
jg 0x10054fd7
mov al, byte [ebp - 8]
lea ecx, [ebp - 0x5a4]
sub al, dl
mov byte [ebp - 0x1b], al
mov eax, dword [ebp - 0x4c]
lea eax, [ecx + eax*4]
mov ecx, dword [ebp - 0x10]
cmp ecx, eax
jb 0x100550e8
mov byte [ebp - 0x1c], 0x63
jmp 0x10055126
mov ecx, dword [ecx]
cmp ecx, dword [ebp + 8]
jae 0x10055103
cmp ecx, 0x100
mov word [ebp - 0x18], cx
setb al
add al, 0xf
mov byte [ebp - 0x1c], al
jmp 0x10055122
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10055229
sub ecx, dword [ebp + 8]
mov al, byte [eax + ecx*2]
mov byte [ebp - 0x1c], al
mov eax, dword [ebp + 0xc]
mov ax, word [eax + ecx*2]
mov word [ebp - 0x18], ax
add dword [ebp - 0x10], 4
mov ecx, dword [ebp - 8]
mov eax, 1
sub ecx, edx
shl eax, cl
mov ecx, edx
mov dword [ebp - 0x34], eax
mov eax, edi
shr eax, cl
cmp eax, esi
jae 0x10055167
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x40]
mov edi, dword [ebp - 0x18]
jmp 0x10055150
mov dword [ecx + eax*8], ebx
mov dword [ecx + eax*8 + 4], edi
add eax, dword [ebp - 0x34]
cmp eax, esi
jb 0x10055150
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov edi, dword [ebp - 0x30]
mov ecx, dword [ebp - 8]
mov eax, 1
lea ecx, [ecx - 1]
shl eax, cl
test edi, eax
je 0x10055180
xor edi, eax
shr eax, 1
test edi, eax
jne 0x10055178
xor edi, eax
mov ecx, edx
mov eax, 1
mov dword [ebp - 0x30], edi
shl eax, cl
mov ecx, dword [ebp - 0xc]
dec eax
and eax, edi
cmp eax, dword [ebp + ecx*4 - 0xe4]
je 0x100551c1
lea ecx, [ecx]
dec ecx
sub edx, ebx
mov dword [ebp - 0xc], ecx
mov eax, 1
mov ecx, edx
shl eax, cl
mov ecx, dword [ebp - 0xc]
dec eax
and eax, edi
cmp eax, dword [ebp + ecx*4 - 0xe4]
jne 0x100551a0
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x10054fc0
mov eax, dword [ebp - 8]
add dword [ebp - 0x28], 4
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0x2c]
jg 0x10055215
mov ecx, dword [ebp - 0x28]
jmp 0x10054fa8
cmp dword [ebp - 0xc], 0
je 0x10055209
mov eax, dword [ebp - 0x124]
test eax, eax
je 0x10055209
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x100551f4
mov eax, 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x50], 0
je 0x10054e70
cmp dword [ebp - 0x2c], 1
je 0x10054e70
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret