Function at 0x587e48
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp + 0x30], eax
mov edi, edx
mov dword [esp + 0x20], ecx
mov eax, dword [edx + 0x28]
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x60]
shl ebx, 2
mov dword [esp + 0x24], ebx
mov eax, dword [ecx + 0x18]
mov ebx, dword [eax + ebx]
test ebx, ebx
je 0x587e80
mov eax, ebx
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, dword [edx + 0x10]
test ebp, ebp
jle 0x587e9d
mov edx, dword [edx + 0x1c]
mov dword [esp + 0x1c], edx
xor eax, eax
mov dword [edx + eax*4], 0
inc eax
cmp dword [edi + 0x10], eax
jg 0x587e90
mov esi, dword [edi + 8]
test esi, esi
jle 0x587e75
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx]
mov dword [esp + 0x1c], ecx
xor esi, esi
mov dword [esp + 0x28], 1
mov dword [esp + 0x34], 0
xor eax, eax
mov dword [esp + 0x2c], ebx
nop
mov edx, eax
shr edx, 5
mov ebx, dword [esp + 0x1c]
mov edx, dword [ebx + edx*4]
mov cl, al
shr edx, cl
and edx, 1
je 0x587f5c
mov ebx, dword [esp + 0x18]
mov ebp, dword [ebx + 0x1c]
mov ecx, dword [ebp + eax*4]
lea edx, [ecx + 8]
movsx ecx, word [ecx + 8]
cmp cx, 0xffff
je 0x587f5c
mov dword [esp + 0x3c], eax
jmp 0x587f08
add edx, 8
movsx ecx, word [edx]
cmp cx, 0xffff
je 0x587f58
cmp ecx, dword [esp + 0x60]
jne 0x587efc
mov esi, dword [edx + 4]
shr esi, 5
mov ebx, dword [edi + 0x1c]
mov eax, 1
mov cl, byte [edx + 4]
shl eax, cl
or dword [ebx + esi*4], eax
mov ecx, dword [edx + 4]
mov ebx, dword [esp + 0x18]
cmp ecx, dword [ebx + 0x10]
je 0x58805c
mov ecx, dword [ebp + ecx*4]
mov esi, 1
cmp word [ecx], 0
jne 0x587efc
mov dword [esp + 0x28], 0
add edx, 8
movsx ecx, word [edx]
cmp cx, 0xffff
jne 0x587f08
nop
mov eax, dword [esp + 0x3c]
inc eax
mov edx, dword [edi + 8]
cmp edx, eax
jg 0x587ec8
mov ebx, dword [esp + 0x2c]
test esi, esi
je 0x587e75
mov esi, dword [esp + 0x18]
test byte [esi + 8], 1
mov dword [esp + 0x3c], 0
je 0x588222
mov ebx, dword [edi + 0x1c]
mov dword [esp + 0x1c], ebx
mov esi, dword [esp + 0x18]
test edx, edx
jg 0x58806c
mov edx, dword [edi + 0x10]
cmp edx, 1
je 0x5881f8
test edx, edx
jle 0x588210
mov eax, dword [esp + 0x1c]
lea ecx, [eax + edx*4]
xor esi, esi
nop
xor esi, dword [eax]
add eax, 4
cmp eax, ecx
jne 0x587fbc
mov ebx, dword [edi + 0x14]
mov ebp, dword [edi + 4]
cmp ebp, 0
jle 0x588217
lea ecx, [edx*4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], edi
mov edi, ebp
mov ebp, ecx
jmp 0x587ff6
add ebx, 0x20
dec edi
je 0x588198
cmp esi, dword [ebx + 4]
jne 0x587fec
cmp dword [esp + 0x18], 1
je 0x58801c
mov dword [esp + 8], ebp
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov edx, dword [esp + 0x1c]
mov dword [esp], edx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x587fec
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x587e75
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0x18]
mov esi, dword [esp + 0x24]
mov dword [eax + esi], ebx
mov ecx, dword [ecx + 0x1c]
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x10]
mov esi, dword [esp + 0x60]
mov dword [ecx + esi*8], eax
mov dword [ecx + esi*8 + 4], edx
mov ecx, dword [esp + 0x20]
mov dword [ebx + 0xc], ecx
mov word [ebx + 0x10], si
jmp 0x587e75
mov dword [esp + 0x34], 1
jmp 0x587f34
mov dword [esp + 0x38], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
shr eax, 5
mov eax, dword [edi + eax*4]
mov cl, byte [esp + 0x18]
shr eax, cl
test al, 1
je 0x58815b
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x18]
mov eax, dword [eax + ecx*4]
lea ebx, [eax + 8]
movsx eax, word [eax + 8]
cmp ax, 0xffff
je 0x58815b
mov ebp, dword [esp + 0x3c]
jmp 0x5880d1
mov ebp, 1
add ebx, 8
movsx eax, word [ebx]
cmp ax, 0xffff
je 0x588150
mov edx, dword [esi + 4]
cmp eax, edx
jle 0x5880c5
mov ecx, dword [ebx + 4]
mov ebp, ecx
shr ebp, 5
mov ebp, dword [edi + ebp*4]
shr ebp, cl
and ebp, 1
jne 0x5880c0
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x30]
call fcn.00587d74
test eax, eax
je 0x588184
mov ecx, dword [ebx + 4]
mov edx, ecx
shr edx, 5
mov eax, dword [esp + 0x2c]
mov edi, dword [eax + 0x1c]
mov eax, 1
shl eax, cl
or dword [edi + edx*4], eax
mov eax, dword [ebx + 4]
cmp eax, dword [esi + 0x10]
je 0x588203
mov edx, dword [esi + 0x1c]
mov eax, dword [edx + eax*4]
mov ebp, 1
cmp word [eax], 0
mov dword [esp + 0x38], 1
jne 0x5880c5
mov dword [esp + 0x28], 0
jmp 0x5880c5
mov dword [esp + 0x3c], ebp
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 8]
inc dword [esp + 0x18]
cmp edx, dword [esp + 0x18]
jg 0x588084
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x38]
test ebx, ebx
jne 0x587f95
jmp 0x587f9d
mov ebp, 1
mov edx, dword [esp + 0x2c]
mov edi, dword [edx + 0x1c]
jmp 0x5880c5
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x68]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov edx, edi
mov eax, dword [esp + 0x30]
call fcn.00587714
mov ebx, eax
mov ecx, dword [edi + 0x10]
test ecx, ecx
jle 0x5881d0
mov ecx, dword [eax]
mov edx, dword [edi + 0x1c]
xor eax, eax
nop
mov ebp, dword [edx + eax*4]
mov dword [ecx + eax*4], ebp
inc eax
cmp dword [edi + 0x10], eax
jg 0x5881c4
mov dword [ebx + 4], esi
mov eax, dword [esp + 0x34]
neg eax
and eax, 2
mov dword [ebx + 8], eax
mov edx, dword [esp + 0x28]
test edx, edx
je 0x58801c
or eax, 8
mov dword [ebx + 8], eax
jmp 0x58801c
mov ecx, dword [esp + 0x1c]
mov esi, dword [ecx]
jmp 0x587fc5
mov dword [esp + 0x34], 1
jmp 0x588127
xor esi, esi
jmp 0x587fc5
jne 0x58801c
jmp 0x58819c
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x1c], edx
jmp 0x587f9d