Function at 0x10059230
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
mov esi, ecx
mov eax, edx
mov ecx, dword [ebp + 8]
add ecx, dword [ebp + 0xc]
cmp dword [ebp + 0xc], 0x12c
lea ebx, [esi + eax]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x4c], ecx
jae 0x10059269
pop esi
mov eax, 0xc0000023
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
cmp esi, 0x10001
ja 0x1005927e
pop esi
mov eax, 0xc00000bb
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push edi
mov edi, dword [ebp + 0x14]
push 0x20000
push 0
push edi
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x50], eax
xor eax, eax
mov dword [ebp - 0x24], esi
mov dword [edi + 0x20000], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x30], eax
mov edi, edi
push 0x800
lea eax, [edi + 0xa4210]
mov dword [ebp - 0x38], 0
push 0
push eax
mov dword [ebp - 0x3c], 0
call sub.msvcrt.dll_memset
mov edx, dword [ebp + 0x14]
lea eax, [esi + 0x10000]
add esp, 0xc
mov dword [ebp - 0x34], eax
lea edi, [edx + 0xa4b10]
cmp eax, ebx
jbe 0x100592ff
mov eax, ebx
mov dword [ebp - 0x34], ebx
mov ecx, dword [ebp - 0x44]
add eax, 0xfffffffb
add ecx, esi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], ecx
cmp eax, ecx
jae 0x10059314
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
mov ecx, 1
mov dword [ebp - 0xc], edi
add edi, 4
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edi
cmp esi, eax
jne 0x1005934d
movzx eax, byte [esi]
mov ecx, 2
mov dword [ebp - 8], ecx
inc dword [edx + eax*4 + 0xa4210]
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], edi
cmp esi, dword [ebp - 0x1c]
jae 0x10059741
mov edi, esi
mov ebx, esi
sub edi, eax
and edi, 0x8001ffff
jns 0x1005936c
dec edi
or edi, 0xfffe0000
inc edi
mov esi, edx
mov edi, edi
movzx eax, byte [ebx + 2]
movzx ecx, word [eax*2 + 0x1000b578]
movzx eax, byte [ebx + 1]
movzx eax, word [eax*2 + 0x1000b378]
xor ecx, eax
movzx eax, byte [ebx]
movzx eax, word [eax*2 + 0x1000b178]
xor ecx, eax
mov eax, dword [esi + ecx*4]
mov dword [esi + ecx*4], ebx
inc ebx
mov dword [esi + edi*4 + 0x20000], eax
inc edi
mov eax, dword [ebp - 0x1c]
and edi, 0x1ffff
cmp ebx, eax
jb 0x10059370
mov esi, dword [ebp - 0x24]
mov ebx, edx
mov edi, dword [ebp - 4]
jmp 0x100593c0
cmp esi, dword [ebp - 0x2c]
jb 0x100593db
cmp esi, eax
jae 0x10059738
push esi
mov edx, eax
lea ecx, [ebp - 0x58]
call fcn.10057900
mov dword [ebp - 0x2c], eax
mov eax, esi
sub eax, dword [ebp - 0x10]
and eax, 0x8001ffff
jns 0x100593ee
dec eax
or eax, 0xfffe0000
inc eax
mov ecx, dword [ebx + eax*4 + 0x20000]
mov edx, dword [esi]
mov dword [ebp - 0x28], edx
lea eax, [ecx + 0x10000]
cmp eax, esi
jbe 0x1005962d
mov eax, dword [ecx]
xor eax, edx
jne 0x1005942d
lea eax, [esi - 0x10000]
mov dword [ebp - 0x20], 3
mov dword [ebp - 0x24], eax
mov edi, esi
xor eax, eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], eax
jmp 0x100594f6
test eax, 0xffffff
je 0x100594a6
sub ecx, dword [ebp - 0x10]
and ecx, 0x8001ffff
jns 0x10059447
dec ecx
or ecx, 0xfffe0000
inc ecx
mov ecx, dword [ebx + ecx*4 + 0x20000]
lea eax, [ecx + 0x10000]
cmp eax, esi
jbe 0x1005962d
mov eax, dword [ecx]
xor eax, edx
je 0x1005940e
test eax, 0xffffff
je 0x100594a6
sub ecx, dword [ebp - 0x10]
and ecx, 0x8001ffff
jns 0x1005947c
dec ecx
or ecx, 0xfffe0000
inc ecx
mov ecx, dword [ebx + ecx*4 + 0x20000]
lea eax, [ecx + 0x10000]
cmp eax, esi
jbe 0x1005962d
mov eax, dword [ecx]
xor eax, edx
je 0x1005940e
test eax, 0xffffff
jne 0x1005962d
mov edi, esi
mov dword [ebp - 0x30], ecx
add esi, 0xffff0000
mov dword [ebp - 0x14], edi
xor eax, eax
mov dword [ebp - 0x24], esi
mov ebx, 3
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], ebx
sub ecx, dword [ebp - 0x10]
and ecx, 0x8001ffff
jns 0x100594d7
dec ecx
or ecx, 0xfffe0000
inc ecx
mov edx, dword [ebp + 0x14]
mov ecx, dword [edx + ecx*4 + 0x20000]
mov edx, dword [ebp - 0x28]
cmp ecx, esi
jbe 0x1005960a
cmp edx, dword [ecx]
jne 0x100595fd
mov esi, edi
mov ebx, dword [ebp - 0x40]
add esi, 4
add ecx, 4
lea edx, [esi + 0x20]
cmp edx, ebx
jae 0x1005955c
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x100595c5
mov eax, dword [esi + 4]
cmp eax, dword [ecx + 4]
jne 0x100595bf
mov eax, dword [esi + 8]
cmp eax, dword [ecx + 8]
jne 0x100595b7
mov eax, dword [esi + 0xc]
cmp eax, dword [ecx + 0xc]
jne 0x100595af
mov eax, dword [esi + 0x10]
cmp eax, dword [ecx + 0x10]
jne 0x100595a7
mov eax, dword [esi + 0x14]
cmp eax, dword [ecx + 0x14]
jne 0x1005959f
mov eax, dword [esi + 0x18]
cmp eax, dword [ecx + 0x18]
jne 0x10059597
mov eax, dword [esi + 0x1c]
cmp eax, dword [ecx + 0x1c]
jne 0x1005958f
mov esi, edx
add ecx, 0x20
lea edx, [esi + 0x20]
cmp edx, ebx
jb 0x10059506
cmp esi, ebx
jae 0x1005956c
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x1005956c
inc esi
inc ecx
cmp esi, ebx
jb 0x10059560
mov ebx, dword [ebp - 0x20]
sub esi, edi
sub ecx, esi
cmp esi, ebx
jbe 0x100595f5
lea eax, [esi + ecx]
mov dword [ebp - 0x30], ecx
mov ebx, esi
mov dword [ebp - 0x20], ebx
cmp eax, edi
ja 0x1005960a
mov eax, dword [ebp - 0x18]
jmp 0x100595fa
add esi, 0x1c
add ecx, 0x1c
jmp 0x100595c5
add esi, 0x18
add ecx, 0x18
jmp 0x100595c5
add esi, 0x14
add ecx, 0x14
jmp 0x100595c5
add esi, 0x10
add ecx, 0x10
jmp 0x100595c5
add esi, 0xc
add ecx, 0xc
jmp 0x100595c5
add esi, 8
add ecx, 8
jmp 0x100595c5
add esi, 4
add ecx, 4
mov al, byte [esi]
cmp al, byte [ecx]
jne 0x1005956c
mov al, byte [esi + 1]
mov edi, dword [ebp - 0x14]
cmp al, byte [ecx + 1]
je 0x100595da
inc esi
inc ecx
jmp 0x1005956c
mov al, byte [esi + 2]
cmp al, byte [ecx + 2]
je 0x100595ea
add esi, 2
add ecx, 2
jmp 0x1005956c
add esi, 3
add ecx, 3
jmp 0x1005956c
mov eax, dword [ebp - 0x18]
add eax, esi
mov esi, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, 0xc
jb 0x100594c4
mov edx, edi
lea esi, [edi + ebx]
sub edx, dword [ebp - 0x30]
mov dword [ebp - 0x24], esi
cmp ebx, 3
jne 0x10059674
cmp edx, 0x1000
jbe 0x10059674
mov edx, dword [ebp - 0x28]
mov esi, edi
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x14]
movzx eax, dl
inc esi
mov dword [ebp - 0x24], esi
inc dword [ebx + eax*4 + 0xa4210]
mov eax, dword [ebp - 8]
mov byte [edi], dl
inc edi
mov dword [ebp - 4], edi
test eax, eax
jle 0x10059655
add eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
jmp 0x100593c0
add eax, eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edi
add edi, 4
mov dword [ebp - 8], 1
mov dword [ebp - 4], edi
mov dword [ecx], eax
mov eax, dword [ebp - 0x1c]
jmp 0x100593c0
cmp edx, 0x100
jb 0x1005968d
mov eax, edx
shr eax, 8
movzx ecx, byte [eax + 0x1000b778]
add ecx, 8
jmp 0x10059694
movzx ecx, byte [edx + 0x1000b778]
add dword [ebp - 0x38], ecx
or eax, 0xffffffff
mov edi, dword [ebp - 4]
shl eax, cl
add edx, eax
shl cl, 4
lea eax, [ebx - 3]
cmp eax, 0xf
jb 0x10059700
add cl, 0xf
sub eax, 0xf
mov byte [edi], cl
cmp eax, 0xff
jae 0x100596cb
mov byte [edi + 1], al
mov eax, 1
add edi, 2
add dword [ebp - 0x3c], eax
jmp 0x10059705
add eax, 0xf
mov byte [edi + 1], 0xff
cmp eax, 0x10000
jae 0x100596ea
mov word [edi + 2], ax
mov eax, 3
add edi, 4
add dword [ebp - 0x3c], eax
jmp 0x10059705
xor ebx, ebx
mov word [edi + 2], bx
mov dword [edi + 4], eax
mov eax, 7
add edi, 8
add dword [ebp - 0x3c], eax
jmp 0x10059705
add cl, al
mov byte [edi], cl
inc edi
mov ebx, dword [ebp + 0x14]
movzx eax, cl
inc dword [ebx + eax*4 + 0xa4610]
mov eax, dword [ebp - 8]
mov word [edi], dx
add edi, 2
test eax, eax
mov dword [ebp - 4], edi
lea eax, [eax*2 + 1]
jle 0x10059657
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x1c]
jmp 0x100593c0
mov ebx, dword [ebp - 0x40]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0x14]
cmp esi, dword [ebp - 0x34]
jae 0x10059786
jmp 0x10059750
movzx eax, byte [esi]
inc dword [edx + eax*4 + 0xa4210]
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
test ecx, ecx
jle 0x10059768
add ecx, ecx
jmp 0x1005977b
lea eax, [ecx + ecx]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edi
add edi, 4
mov dword [ecx], eax
mov ecx, 1
cmp esi, dword [ebp - 0x34]
jb 0x10059750
mov dword [ebp - 4], edi
mov dword [ebp - 0x24], esi
test ecx, ecx
jle 0x1005979b
lea ebx, [ebx]
lea ecx, [ecx*2 + 1]
test ecx, ecx
jg 0x10059790
lea eax, [ecx*2 + 1]
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
cmp esi, ebx
jb 0x100597b8
inc dword [edx + 0xa4610]
mov edi, 1
jmp 0x100597ba
xor edi, edi
lea ebx, [edx + 0xa0000]
mov ecx, ebx
call fcn.10058530
mov ecx, dword [ebp - 0x38]
add ecx, 0x1f
add eax, ecx
mov ecx, dword [ebp - 0x3c]
shr eax, 5
lea eax, [ecx + eax*4]
mov ecx, dword [ebp - 0x48]
add eax, 0x102
add eax, ecx
cmp eax, dword [ebp - 0x4c]
jae 0x10059820
mov edx, dword [ebp + 0x14]
push edi
push ecx
push dword [ebp - 4]
lea edx, [edx + 0xa4b10]
mov ecx, ebx
call fcn.100588c0
mov ebx, dword [ebp - 0x40]
test edi, edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x48], eax
je 0x100592c0
mov ecx, dword [ebp + 0x10]
sub eax, dword [ebp + 8]
pop edi
pop esi
mov dword [ecx], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
pop edi
pop esi
mov eax, 0xc0000023
pop ebx
mov esp, ebp
pop ebp
ret 0x1c