Function at 0x40018adf
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a4
mov eax, dword [0x40025d24]
xor eax, esp
mov dword [esp + 0x1a0], eax
mov eax, dword [ebp + 0x10]
mov ecx, edx
push ebx
mov ebx, dword [ebp + 8]
xor edx, edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], eax
push esi
push edi
push 0x14
pop edx
test ecx, ecx
je 0x4001937d
test ebx, ebx
je 0x4001937d
cmp dword [ebp + 0xc], 0
je 0x4001937d
test eax, eax
je 0x4001937d
push 5
pop ebx
mov ecx, ebx
mov dword [esp + 0x10c], 0x123174bb
mov esi, 0x4002503c
mov dword [esp + 0x110], 0x86521ff8
lea edi, [esp + 0x15c]
mov dword [esp + 0x114], 0x98d2438b
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x118], 0x7966ce12
xor ecx, ecx
mov dword [esp + 0x11c], 0xc5d92014
xor edx, edx
mov eax, ecx
div ebx
mov eax, dword [esp + edx*4 + 0x10c]
xor dword [esp + ecx*4 + 0x15c], eax
inc ecx
cmp ecx, ebx
jb 0x40018b91
mov ecx, ebx
lea esi, [esp + 0x15c]
lea edi, [esp + 0xf8]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x104
call fcn.40015bca
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x40018bda
mov ebx, 0x8007000e
jmp 0x40018e1c
lea eax, [ebx + 0x34]
mov dword [esp + 0x120], 0x123174bb
lea edx, [eax + 0x58]
mov dword [esp + 0x124], 0x86521ff8
push 0xd
lea ecx, [edx + 0x3c]
mov dword [esp + 0x12c], 0x98d2438b
mov dword [esp + 0x28], ecx
mov edi, ebx
add ecx, 0x14
mov dword [esp + 0x130], 0x7966ce12
mov dword [esp + 0x20], ecx
mov esi, 0x40025a40
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [ebx], eax
mov edi, eax
mov esi, dword [0x40025a40]
push 0x16
pop ecx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx]
push 0xf
pop ecx
push 5
mov dword [eax + 0x30], edx
mov edi, dword [ebx]
mov esi, dword [0x40025a40]
mov dword [esp + 0x134], 0xc5d92014
mov edi, dword [edi + 0x30]
mov esi, dword [esi + 0x30]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebx]
lea edi, [esp + 0x174]
mov ecx, dword [esp + 0x20]
add ecx, 0x14
mov eax, dword [eax + 0x30]
mov dword [eax + 0x20], ecx
mov eax, dword [ebx]
pop ebx
mov ecx, ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [0x40025a40]
mov esi, dword [eax + 0x30]
mov esi, dword [esi + 0x20]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
xor edx, edx
mov eax, ecx
div ebx
mov eax, dword [esp + edx*4 + 0x120]
xor dword [esp + ecx*4 + 0x170], eax
inc ecx
cmp ecx, ebx
jb 0x40018c8e
mov edi, dword [esp + 0xc]
lea esi, [esp + 0x170]
mov eax, dword [esp + 0x24]
mov ecx, ebx
mov ebx, dword [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
push 5
pop edx
mov dword [ebx + 4], eax
lea edi, [esp + 0x184]
mov esi, dword [0x40025a44]
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
push edx
mov dword [esp + 0x138], 0x123174bb
xor ecx, ecx
mov dword [esp + 0x13c], 0x86521ff8
mov dword [esp + 0x140], 0x98d2438b
mov dword [esp + 0x144], 0x7966ce12
mov dword [esp + 0x148], 0xc5d92014
pop esi
xor edx, edx
mov eax, ecx
div esi
mov eax, dword [esp + edx*4 + 0x134]
xor dword [esp + ecx*4 + 0x184], eax
inc ecx
cmp ecx, esi
jb 0x40018d10
mov edi, dword [esp + 0x24]
mov ecx, esi
mov eax, dword [esp + 0x1c]
lea esi, [esp + 0x184]
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 8], eax
lea edi, [esp + 0x198]
mov esi, dword [0x40025a48]
push 5
pop ebx
mov ecx, ebx
mov dword [esp + 0x148], 0x123174bb
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14c], 0x86521ff8
xor ecx, ecx
mov dword [esp + 0x150], 0x98d2438b
mov dword [esp + 0x154], 0x7966ce12
mov dword [esp + 0x158], 0xc5d92014
xor edx, edx
mov eax, ecx
div ebx
mov eax, dword [esp + edx*4 + 0x148]
xor dword [esp + ecx*4 + 0x198], eax
inc ecx
cmp ecx, ebx
jb 0x40018d8c
mov edi, dword [esp + 0x1c]
lea esi, [esp + 0x198]
mov ecx, ebx
rep movsd dword es:[edi], dword [esi]
xor ebx, ebx
mov ecx, 0x664
mov dword [esp + 0x24], ebx
call fcn.40015bca
mov edi, eax
mov dword [esp + 0x1c], edi
test edi, edi
jne 0x40018e6a
mov esi, dword [esp + 0x14]
mov ebx, 0x8007000e
push 0x14
pop edx
test esi, esi
je 0x40018e1c
mov eax, dword [esi]
mov ecx, edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x20]
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x40018dec
mov eax, dword [esp + 0x14]
mov esi, edx
mov ecx, dword [eax + 4]
mov byte [ecx], 0
inc ecx
sub esi, 1
jne 0x40018dfe
mov ecx, edx
mov edx, dword [eax + 8]
mov byte [edx], 0
inc edx
sub ecx, 1
jne 0x40018e0c
mov ecx, eax
call fcn.40015bdd
push 0x14
lea eax, [esp + 0xfc]
pop ecx
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x40018e26
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40018e4e
mov ecx, eax
mov edx, 0x664
mov byte [ecx], 0
inc ecx
sub edx, 1
jne 0x40018e3e
mov ecx, eax
call fcn.40015bdd
mov ecx, dword [esp + 0x1ac]
not ebx
shr ebx, 0x1f
pop edi
pop esi
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.40020a80
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x100]
lea edi, [eax + 0x100]
mov dword [esp + 0x3c], eax
lea eax, [edi + 0x14]
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x48]
add eax, 0x214
mov dword [esp + 0x28], eax
add eax, 0x200
mov dword [esp + 0x2c], eax
add eax, 0x28
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
cmp ecx, eax
je 0x40018eb8
push 0x28
push eax
mov eax, ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 5
pop eax
mov ecx, eax
lea esi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x10]
lea esi, [esp + 0x5c]
mov ecx, eax
mov eax, dword [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x70]
cmp ecx, eax
je 0x40018ee9
push 0x28
push eax
mov eax, ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov esi, dword [esp + 0x14]
push 0x14
pop ecx
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x34], eax
call fcn.40015bca
mov dword [esp + 0xc], eax
test eax, eax
je 0x40018f3d
push 5
pop edx
mov ecx, edx
lea esi, [esp + 0x70]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
push ecx
push dword [esp + 0x38]
mov ecx, eax
push dword [esp + 0x34]
call fcn.4001a195
mov ecx, dword [esp + 0xc]
mov eax, ecx
push 0x14
pop edx
mov byte [eax], bl
inc eax
sub edx, 1
jne 0x40018f2c
call fcn.40015bdd
mov esi, dword [esp + 0x14]
mov eax, dword [esi]
push 0x14
pop ecx
mov eax, dword [eax + 0x30]
mov dword [esp + 0x34], eax
call fcn.40015bca
mov dword [esp + 0xc], eax
test eax, eax
je 0x40018f96
push 5
pop edx
mov edi, eax
lea esi, [esp + 0x84]
mov eax, dword [esp + 0x2c]
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0xc]
add eax, 0x14
push ecx
push dword [esp + 0x38]
mov ecx, esi
push eax
call fcn.4001a195
push 0x14
pop ecx
mov eax, esi
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x40018f83
mov ecx, esi
call fcn.40015bdd
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x98]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.40020080
push dword [ebp + 0xc]
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x9c]
call fcn.40020140
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x98]
call fcn.40020270
push 0x5c
pop ecx
lea eax, [esp + 0x98]
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x40018fda
mov ecx, dword [esp + 0x2c]
sub esp, 0xc
mov edx, esi
call fcn.4001acfe
test eax, eax
jne 0x40018ffe
mov ebx, 0x800480d5
jmp 0x40018ddb
mov edi, dword [0x40025050]
mov eax, edi
mov ecx, dword [esp + 0x30]
test eax, eax
je 0x40019024
lea edx, [ecx - 4]
lea edx, [edx + eax*4]
cmp dword [edx], ebx
jne 0x40019020
sub edx, 4
sub eax, 1
jne 0x40019014
test eax, eax
jne 0x40019046
mov eax, edi
test eax, eax
je 0x40019046
lea edx, [eax*4 + 0x14]
add edx, 0xfffffffc
add edx, ecx
cmp dword [edx], ebx
jne 0x40019042
sub edx, 4
sub eax, 1
jne 0x40019036
test eax, eax
jne 0x40018ff4
push edi
lea edx, [esp + 0xfc]
call fcn.40019692
test eax, eax
jns 0x40018ff4
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0xf8]
push edi
call fcn.40019692
test eax, eax
jns 0x40018ff4
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x40]
mov edx, dword [0x40025050]
push ecx
push 0
push eax
push ecx
push dword [esp + 0x4c]
lea eax, [esp + 0x10c]
push ecx
mov ecx, dword [esp + 0x28]
push edi
push edx
push eax
call fcn.4001af65
xor ecx, ecx
mov edx, eax
inc ecx
push ecx
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x48]
push ecx
lea ecx, [edi + 0x100]
call fcn.4001961e
test eax, eax
jne 0x40018ff4
push ecx
mov ecx, dword [esp + 0x1c]
lea edx, [edi + 0x100]
call fcn.400180ce
test eax, eax
je 0x40018ff4
mov ecx, dword [esp + 0x10]
mov eax, dword [0x40025050]
mov dword [esp + 0x20], eax
lea edx, [ecx + 0x14]
cmp edi, edx
je 0x400191a1
lea ecx, [edi + 0x100]
cmp ecx, edx
je 0x40019113
mov esi, eax
shl esi, 2
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x14]
test eax, eax
jne 0x4001911c
push dword [esp + 0x18]
push 0
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
mov ecx, dword [esp + 0x10]
jmp 0x400191a1
push ecx
push eax
push edx
mov edx, dword [edi]
call fcn.4001a43c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov dword [ecx + edx + 0x14], eax
xor eax, eax
inc eax
mov dword [esp + 0x18], eax
cmp dword [esp + 0x20], eax
je 0x4001919f
mov ebx, dword [esp + 0x20]
lea eax, [edx + 0x14]
lea ecx, [edi + 4]
sub eax, edi
mov dword [esp + 0xc], ecx
lea esi, [edi + 0x100]
mov dword [esp + 0x38], eax
mov edx, dword [ecx]
add eax, ecx
push ecx
push ebx
push eax
mov ecx, esi
call fcn.4001a274
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
lea ecx, [ebx + edx]
inc edx
mov dword [edi + ecx*4 + 0x14], eax
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
add ecx, 4
mov eax, dword [esp + 0x38]
mov dword [esp + 0x18], edx
mov dword [esp + 0xc], ecx
cmp edx, ebx
jne 0x40019159
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
jmp 0x40019113
mov ecx, edx
push ecx
lea edx, [edi + 0x100]
add ecx, 0x14
push edx
mov edx, dword [0x40025050]
lea eax, [esp + 0x100]
push 0
push 0x40025acc
push edx
push eax
add edx, edx
call fcn.4001bfad
mov eax, dword [esp + 0x10]
push ecx
push esi
add eax, 0x14
mov ecx, 0x4002507c
push eax
push dword [0x40025050]
lea eax, [edi + 0x100]
push eax
push 0x3c
call fcn.4001c66d
test eax, eax
je 0x40018ff4
mov edx, dword [esp + 0x28]
mov eax, dword [0x40025050]
mov dword [esp + 0x20], eax
cmp edi, edx
je 0x400192aa
mov ecx, dword [esp + 0x30]
cmp ecx, edx
je 0x400192aa
mov esi, eax
shl esi, 2
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x14]
test eax, eax
jne 0x40019237
push dword [esp + 0xc]
push 0
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x400192aa
push ecx
push eax
push edx
mov edx, dword [edi]
call fcn.4001a43c
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x28]
mov dword [ecx + edx], eax
xor eax, eax
inc eax
mov dword [esp + 0xc], eax
cmp dword [esp + 0x20], eax
je 0x400192aa
mov esi, dword [esp + 0x20]
lea ecx, [edi + 4]
mov ebx, dword [esp + 0x30]
mov eax, edx
sub eax, edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x38], eax
mov edi, edx
mov edx, dword [ecx]
add eax, ecx
push ecx
push esi
push eax
mov ecx, ebx
call fcn.4001a274
mov edx, dword [esp + 0xc]
lea ecx, [esi + edx]
inc edx
mov dword [edi + ecx*4], eax
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
add ecx, 4
mov dword [esp + 0xc], edx
mov dword [esp + 0x18], ecx
cmp edx, esi
jne 0x40019272
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0xf8]
mov edx, dword [0x40025050]
push ecx
mov ecx, dword [esp + 0x2c]
push edi
push 0
push 0x40025acc
push edx
push eax
add edx, edx
call fcn.4001bfad
mov ecx, dword [esp + 0x2c]
sub esp, 0xc
mov edx, esi
call fcn.4001acfe
test eax, eax
je 0x40018ff4
push ecx
mov ecx, dword [esp + 0x30]
push esi
push dword [esp + 0x30]
push dword [0x40025050]
push edi
push 0
call fcn.4001c66d
test eax, eax
je 0x40018ff4
mov edi, dword [esp + 0x10]
push ecx
push ecx
add edi, 0x14
push esi
push 1
push edi
lea edx, [edi + 0x200]
mov ecx, edi
call fcn.4001a5d6
push 0
mov edx, esi
mov ecx, edi
call fcn.4001ab90
test eax, eax
jne 0x40018ff4
mov edx, dword [esi]
lea eax, [esp + 0xf8]
push ecx
push dword [esp + 0x40]
mov ecx, edi
push 0x40025acc
push dword [0x40025050]
push eax
call fcn.400181cc
test eax, eax
je 0x40018ff4
push dword [0x40025050]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x34]
call fcn.40019692
test eax, eax
je 0x40018ddb
jmp 0x40018ff4
mov esi, dword [esp + 0x14]
mov ebx, 0x80070057
jmp 0x40018dde