Function at 0x591230
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 4]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push eax
push edi
push ebx
call fcn.0056c440
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x5912c3
mov eax, dword [ebp + 0x10]
mov esi, dword [ecx + 8]
test eax, eax
jne 0x5912b4
mov edx, dword [ecx + 4]
mov eax, dword [ecx]
test edx, edx
je 0x59126a
mov dword [edx], eax
jmp 0x59126d
mov dword [ebx + 8], eax
mov edx, dword [ecx]
test edx, edx
je 0x591279
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x591293
mov eax, dword [ebp - 4]
cmp dword [edx + eax*8 + 4], ecx
lea edx, [edx + eax*8]
jne 0x591291
mov eax, dword [ecx]
mov dword [edx + 4], eax
dec dword [edx]
push ecx
call fcn.00556350
add esp, 4
add dword [ebx + 4], 0xffffffff
jne 0x5912ba
push ebx
call fcn.00591160
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edi
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x591436
push 0
push 0x10
call fcn.005949e0
mov edi, eax
add esp, 8
mov dword [ebp - 0x10], edi
test edi, edi
je 0x5912ba
mov eax, dword [ebp + 0xc]
mov dword [edi + 0xc], eax
mov dword [edi + 8], esi
inc dword [ebx + 4]
mov ecx, dword [ebx + 4]
cmp ecx, 0xa
jb 0x591408
mov edx, dword [ebx]
lea eax, [edx + edx]
cmp ecx, eax
jbe 0x591408
lea esi, [ecx + ecx]
mov ecx, 0x80
lea eax, [esi*8]
cmp eax, 0x400
cmova esi, ecx
cmp esi, edx
je 0x591408
mov eax, dword [0x6f2e40]
test eax, eax
je 0x591332
call eax
lea eax, [esi*8]
push 0
push eax
call fcn.005949e0
mov ecx, dword [0x6f2e44]
add esp, 8
mov esi, eax
mov dword [ebp - 0xc], esi
test ecx, ecx
je 0x591355
call ecx
test esi, esi
je 0x591408
push dword [ebx + 0xc]
call fcn.00556350
push esi
mov dword [ebx + 0xc], esi
call dword [0x6ebdc8]
shr eax, 3
mov dword [ebp - 8], eax
mov dword [ebx], eax
lea ecx, [eax*8]
push ecx
push 0
push esi
call fcn.00607da0
mov ecx, dword [ebx + 8]
add esp, 0x14
mov dword [ebp - 4], ecx
mov dword [ebx + 8], 0
test ecx, ecx
je 0x5913f7
nop dword [eax + eax]
mov edx, dword [ecx + 0xc]
xor edi, edi
mov al, byte [edx]
test al, al
je 0x5913d1
nop dword [eax + eax]
movzx eax, al
lea edx, [edx + 1]
movzx ecx, byte [eax + 0x6836d0]
lea eax, [edi*8]
xor ecx, eax
mov al, byte [edx]
xor edi, ecx
test al, al
jne 0x5913b0
mov ecx, dword [ebp - 4]
xor edx, edx
mov esi, dword [ecx]
mov eax, edi
div dword [ebp - 8]
push ecx
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + edx*8]
push eax
push ebx
call fcn.00570f30
add esp, 0xc
mov ecx, esi
mov dword [ebp - 4], ecx
test esi, esi
jne 0x5913a0
mov edi, dword [ebp - 0x10]
push dword [ebp + 0xc]
call fcn.005b7130
xor edx, edx
add esp, 4
div dword [ebx]
jmp 0x59140b
mov edx, dword [ebp - 4]
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x591429
lea eax, [eax + edx*8]
push edi
push eax
push ebx
call fcn.00570f30
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
push edi
push eax
push ebx
call fcn.00570f30
add esp, 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret