Function at 0x401177
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58c
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
push 0x44
push 0
lea eax, [ebp - 0x88]
push eax
call fcn.00402e70
add esp, 0xc
mov eax, dword [edi]
add edi, 4
inc dword [ebp + eax*4 - 0x88]
dec esi
jne 0x40119c
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0x20]
cmp dword [ebp - 0x88], eax
jne 0x4011c7
xor eax, eax
mov ecx, dword [ebp + 0x1c]
mov dword [esi], eax
mov dword [ecx], eax
jmp 0x40155d
mov ebx, dword [esi]
mov ecx, 1
lea eax, [ebp - 0x84]
cmp dword [eax], 0
jne 0x4011e4
add eax, 4
inc ecx
lea edx, [ebp - 0x48]
cmp eax, edx
jbe 0x4011d4
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], ecx
cmp ebx, ecx
jae 0x4011f0
mov ebx, ecx
mov edx, 0x10
lea eax, [ebp - 0x48]
cmp dword [eax], 0
jne 0x40120b
sub eax, 4
dec edx
lea edi, [ebp - 0x88]
cmp eax, edi
jne 0x4011f8
mov dword [ebp - 0x24], edx
cmp edx, ebx
jae 0x401214
mov ebx, edx
mov edi, 1
mov dword [esi], ebx
shl edi, cl
cmp edx, ecx
jbe 0x401236
lea eax, [ebp + ecx*4 - 0x88]
sub edi, dword [eax]
js 0x40124d
add edi, edi
add eax, 4
inc ecx
cmp edx, ecx
ja 0x401228
lea ecx, [ebp + edx*4 - 0x88]
mov eax, dword [ecx]
sub edi, eax
jns 0x401257
mov eax, 0xfffffffd
jmp 0x40155d
mov eax, 0xfffffffd
jmp 0x40155d
add eax, edi
lea esi, [ebp - 0x84]
mov dword [ecx], eax
xor eax, eax
lea ecx, [ebp - 0xc4]
dec edx
mov dword [ebp - 0xc8], eax
je 0x40127f
add eax, dword [esi]
add esi, 4
mov dword [ecx], eax
add ecx, 4
dec edx
jne 0x401272
xor ecx, ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
add edx, 4
test eax, eax
je 0x4012a0
lea esi, [ebp + eax*4 - 0xcc]
mov eax, dword [esi]
inc eax
mov dword [esi], eax
mov dword [ebp + eax*4 - 0x590], ecx
inc ecx
cmp dword [ebp + 8], ecx
ja 0x401284
xor edx, edx
mov eax, ebx
lea ecx, [ebp - 0x58c]
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x2c], ecx
mov esi, dword [ebp - 4]
mov dword [ebp - 0xcc], edx
neg eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x28], 0xffffffff
cmp esi, dword [ebp - 0x24]
jg 0x40152f
mov eax, dword [ebp - 0x14]
lea ecx, [ebp + eax*4 - 0x88]
mov dword [ebp - 0x3c], ecx
mov eax, dword [ecx]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
dec dword [ebp - 0x30]
test eax, eax
je 0x401520
mov eax, dword [ebp - 8]
add eax, ebx
cmp eax, dword [ebp - 0x14]
jge 0x401412
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
shl esi, 2
inc eax
mov dword [ebp - 0x38], eax
add esi, 4
mov eax, dword [ebp - 0x24]
inc dword [ebp - 0x28]
add dword [ebp - 8], ebx
sub eax, dword [ebp - 8]
mov dword [ebp - 0x10], ebx
cmp ebx, eax
jl 0x401331
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov edx, 1
sub eax, dword [ebp - 8]
mov cl, al
mov dword [ebp - 4], eax
shl edx, cl
cmp dword [ebp - 0x38], edx
jae 0x401379
mov eax, dword [ebp - 0x3c]
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x30]
inc eax
sub edx, eax
cmp dword [ebp - 0x10], ecx
jbe 0x401379
add dword [ebp - 0x18], 4
add edx, edx
mov eax, dword [ebp - 0x18]
cmp dword [eax], edx
jae 0x401379
sub edx, dword [eax]
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
cmp dword [ebp - 0x10], ecx
ja 0x40135f
mov eax, 1
mov cl, byte [ebp - 4]
shl eax, cl
mov dword [ebp - 0x10], eax
lea ecx, [eax*8 + 8]
push ecx
call fcn.00402d70
add esp, 4
test eax, eax
je 0x401540
lea edx, [eax + 8]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp + 0x1c], eax
mov dword [ebp + esi - 0x10c], edx
mov dword [ecx], edx
mov ecx, dword [ebp - 0x10]
inc ecx
add dword [0x407420], ecx
test esi, esi
mov dword [eax], 0
je 0x401404
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x20], edx
mov dword [ebp + esi - 0xcc], eax
mov byte [ebp - 0x1a], bl
mov al, byte [ebp - 4]
mov dword [ebp - 0x18], edx
add al, 0x10
mov ecx, dword [ebp - 8]
sub cl, bl
mov byte [ebp - 0x19], al
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
shr eax, cl
shl eax, 3
mov ecx, dword [ebp - 0x18]
add eax, dword [ebp + esi - 0x110]
mov dword [eax], ecx
mov ecx, dword [ebp - 4]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 8]
add eax, ebx
cmp eax, dword [ebp - 0x14]
jl 0x401318
mov cl, byte [ebp - 0x14]
mov eax, dword [ebp + 8]
sub cl, byte [ebp - 8]
lea esi, [ebp + eax*4 - 0x58c]
mov byte [ebp - 0x1a], cl
cmp esi, dword [ebp - 0x2c]
ja 0x401430
mov byte [ebp - 0x19], 0xff
jmp 0x40146c
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
cmp dword [ebp + 0xc], eax
jbe 0x40144f
mov word [ebp - 0x1c], ax
cmp eax, 0x100
mov byte [ebp - 0x19], 0x10
jb 0x401468
mov byte [ebp - 0x19], 0xf
jmp 0x401468
sub eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
add eax, eax
mov si, word [eax + esi]
mov word [ebp - 0x1c], si
mov esi, dword [ebp + 0x18]
mov al, byte [eax + esi]
mov byte [ebp - 0x19], al
add dword [ebp - 0x2c], 4
mov eax, 1
mov esi, dword [ebp - 0xc]
shl eax, cl
mov cl, byte [ebp - 8]
mov dword [ebp - 4], eax
shr esi, cl
cmp dword [ebp - 0x10], esi
jbe 0x4014c2
lea eax, [edx + esi*8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
shl eax, 3
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
add esi, dword [ebp - 4]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], ecx
mov ecx, eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x44]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x40]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x38]
add dword [ebp - 0x18], ecx
cmp dword [ebp - 0x10], esi
ja 0x401492
mov eax, 1
mov cl, byte [ebp - 0x14]
dec cl
shl eax, cl
test dword [ebp - 0xc], eax
je 0x4014dd
xor dword [ebp - 0xc], eax
shr eax, 1
test dword [ebp - 0xc], eax
jne 0x4014d3
mov esi, 1
mov cl, byte [ebp - 8]
shl esi, cl
dec esi
xor dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x28]
and esi, dword [ebp - 0xc]
lea eax, [ebp + eax*4 - 0xcc]
cmp esi, dword [eax]
je 0x4012ef
sub eax, 4
mov esi, 1
sub dword [ebp - 8], ebx
dec dword [ebp - 0x28]
mov cl, byte [ebp - 8]
shl esi, cl
dec esi
and esi, dword [ebp - 0xc]
cmp esi, dword [eax]
jne 0x401500
jmp 0x4012ef
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x24]
jle 0x4012dd
cmp dword [ebp - 0x24], 1
je 0x40155b
test edi, edi
je 0x40155b
mov eax, 0xffffffff
jmp 0x40155d
cmp dword [ebp - 0x28], 0
je 0x401554
push dword [ebp - 0x10c]
call fcn.00401564
add esp, 4
mov eax, 0xfffffffe
jmp 0x40155d
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret