Function at 0x408a4b
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0x38
push esi
push edi
xor edi, edi
cmp eax, edi
mov esi, ecx
jne 0x408a66
pop edi
xor eax, eax
pop esi
add esp, 0x38
ret 0x18
mov eax, dword [esp + 0x44]
cmp eax, edi
je 0x408a76
mov ecx, dword [esp + 0x48]
cmp ecx, edi
jne 0x408a81
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x38
ret 0x18
push ebp
mov ebp, dword [esp + 0x54]
cmp ebp, edi
jne 0x408a96
pop ebp
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x38
ret 0x18
mov dword [esi + 0x414], eax
dec eax
mov dword [esi + 0x420], eax
mov dword [esi + 0x410], ecx
mov eax, 0xdd3beaab
xor ecx, ecx
mov edx, eax
add eax, eax
shr edx, 0x1f
or edx, eax
movzx eax, byte [ecx + str._r_n_r_naPLib_v0.42_____the_smaller_the_better_:__r_nCopyright__c__1998_2004_by_Joergen_Ibsen__All_Rights_Reserved._r_n_r_nThis_copy_of_aPLib_is_free_for_non_commercial_use._r_n_r_nMore_information:_http:__www.ibsensoftware.com__r_n_r_n]
xor edx, eax
mov eax, edx
shr eax, 0x1f
add edx, edx
or eax, edx
movzx edx, byte [ecx + 0x418701]
xor eax, edx
mov edx, eax
add eax, eax
shr edx, 0x1f
or edx, eax
movzx eax, byte [ecx + 0x418702]
xor edx, eax
mov eax, edx
shr eax, 0x1f
add edx, edx
or eax, edx
movzx edx, byte [ecx + 0x418703]
xor eax, edx
mov edx, eax
add eax, eax
shr edx, 0x1f
or edx, eax
movzx eax, byte [ecx + 0x418704]
add ecx, 5
xor eax, edx
cmp ecx, 0xfa
jb 0x408ab0
cmp eax, edi
jne 0x4094ab
mov dword [esi], ebp
lea edx, [ebp + 0x5a018]
lea ecx, [esi + 4]
mov ebp, 0x100
push ebx
mov dword [ecx], edx
xor eax, eax
mov ebx, dword [ecx]
mov dword [eax + ebx], edi
add eax, 4
cmp eax, 0x400
jb 0x408b32
add edx, 0x400
add ecx, 4
dec ebp
jne 0x408b2e
mov ecx, dword [esi + 0x414]
mov edx, dword [esi]
or eax, 0xffffffff
mov ebp, 1
mov dword [esi + 0x424], eax
mov dword [esi + 0x408], ecx
mov dword [esi + 0x404], ebp
mov dword [esi + 0x40c], edi
mov dword [edx], edi
mov ecx, dword [esi + 0x414]
mov edx, dword [esi + 0x410]
mov dword [esi + 0x428], edi
mov cl, byte [ecx]
mov byte [edx], cl
mov ebx, dword [esi + 0x414]
mov edx, dword [esi + 0x410]
inc ebx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
inc edx
dec eax
cmp eax, ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edi
mov dword [esi + 0x414], ebx
mov dword [esi + 0x410], edx
mov dword [esi + 0x41c], ebp
mov dword [esp + 0x58], ebp
jbe 0x40938c
nop
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x408c11
mov ecx, dword [esp + 0x18]
inc ecx
test cl, cl
mov dword [esp + 0x18], ecx
jne 0x408c11
mov edx, dword [esp + 0x60]
mov ecx, dword [esi + 0x410]
mov ebx, dword [esp + 0x50]
push edx
mov edx, dword [esi + 0x414]
sub ecx, ebx
mov ebx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x5c]
sub edx, ebx
push edx
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x409355
cmp ebp, dword [esp + 0x1c]
jne 0x408c29
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], edx
jmp 0x408c48
mov eax, dword [esp + 0x54]
mov ecx, dword [esi + 0x414]
sub eax, ebp
push eax
push ebp
push ecx
lea edx, [esp + 0x3c]
push edx
mov ecx, esi
call fcn.0040874f
mov ebx, dword [esp + 0x34]
cmp ebx, 2
jl 0x4091e8
mov eax, dword [esi + 0x424]
cmp dword [esp + 0x30], eax
mov dword [esp + 0x14], 0
jne 0x408cc5
cmp edi, 1
jbe 0x408fb3
cmp dword [esp + 0x38], eax
je 0x408fb3
mov eax, dword [esp + 0x10]
push edi
push ebp
push eax
mov ecx, esi
call fcn.004080e1
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
cmp eax, ebp
jge 0x408faf
mov eax, dword [esp + 0x38]
cmp eax, 0x500
jl 0x408cb1
cmp edi, 2
je 0x408faf
cmp eax, 0x7d00
jl 0x408cc1
cmp edi, 3
je 0x408faf
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
mov edx, dword [esi + 0x414]
sub eax, ebp
mov dword [esp + 0x20], eax
inc ebp
dec eax
push eax
push ebp
inc edx
push edx
lea eax, [esp + 0x4c]
push eax
mov ecx, esi
call fcn.0040874f
mov eax, dword [esp + 0x40]
cmp eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x44]
push ecx
mov dword [esp + 0x20], ebp
mov ecx, esi
push eax
jl 0x408d29
call fcn.004083c7
mov edx, dword [esp + 0x30]
push ebx
push edx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
mov ecx, eax
sub ecx, ebp
shl ecx, 1
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
jmp 0x408d48
call fcn.004083c7
mov edx, dword [esp + 0x30]
push ebx
push edx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
sub eax, ebp
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [esp + 0x44]
cmp ebx, eax
jge 0x408d58
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x408d8e
mov eax, dword [esp + 0x44]
cmp eax, ebx
jl 0x408d8c
push eax
mov eax, dword [esp + 0x44]
push eax
mov ecx, esi
call fcn.004083c7
mov ecx, dword [esp + 0x30]
push ebx
push ecx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
cmp ebp, eax
jge 0x408d8c
mov dword [esp + 0x14], 1
test edi, edi
jne 0x408de1
mov ebp, dword [esp + 0x44]
cmp ebp, ebx
jge 0x408de1
mov edx, dword [esp + 0x58]
mov eax, dword [esi + 0x414]
push 1
push edx
push eax
mov ecx, esi
call fcn.004080e1
mov ecx, dword [esp + 0x40]
push ebp
push ecx
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
push ebx
lea ebp, [ecx + eax + 1]
push edx
mov ecx, esi
call fcn.004083c7
cmp ebp, eax
jle 0x408de1
mov dword [esp + 0x14], 0
jmp 0x408ded
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4091c7
cmp ebx, 2
jle 0x408faf
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x58]
mov edx, dword [esi + 0x414]
add eax, 0xfffffffe
push eax
add ecx, 2
push ecx
add edx, 2
push edx
lea eax, [esp + 0x34]
push eax
mov ecx, esi
call fcn.0040874f
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x30]
cmp eax, ebp
push ecx
mov ecx, esi
push eax
jl 0x408e5b
call fcn.004083c7
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, dword [esp + 0x24]
sub eax, ecx
cdq
and edx, 3
add edx, eax
mov eax, dword [esp + 0x2c]
sar edx, 2
add edx, eax
cmp ebx, edx
jmp 0x408e8f
call fcn.004083c7
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, eax
mov eax, dword [esp + 0x24]
sub ecx, eax
shl ecx, 1
mov eax, 0x2e8ba2e9
imul ecx
mov eax, dword [esp + 0x2c]
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add ecx, eax
cmp ebx, ecx
jge 0x408e99
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x408ec5
cmp eax, ebx
jl 0x408ec5
mov edx, dword [esp + 0x28]
push eax
push edx
mov ecx, esi
call fcn.004083c7
mov ebp, eax
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.004083c7
cmp ebp, eax
jl 0x4091c7
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4091c7
cmp ebx, 3
jle 0x408faf
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x58]
mov eax, dword [esi + 0x414]
add ecx, 0xfffffffd
push ecx
add edx, 3
push edx
add eax, 3
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
call fcn.0040874f
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x30]
cmp eax, ebp
push edx
mov ecx, esi
push eax
jl 0x408f39
call fcn.004083c7
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, dword [esp + 0x24]
sub eax, ecx
cdq
and edx, 3
add eax, edx
mov ecx, eax
sar ecx, 2
jmp 0x408f65
call fcn.004083c7
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, eax
mov eax, dword [esp + 0x24]
sub ecx, eax
shl ecx, 1
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov eax, dword [esp + 0x2c]
add ecx, eax
cmp ebx, ecx
jge 0x408f77
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x408fa3
cmp eax, ebx
jl 0x408fa3
mov edx, dword [esp + 0x28]
push eax
push edx
mov ecx, esi
call fcn.004083c7
mov ebp, eax
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.004083c7
cmp ebp, eax
jl 0x4091c7
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4091c7
mov ebp, dword [esp + 0x58]
test edi, edi
je 0x40911e
cmp edi, 1
jbe 0x40910c
mov edx, dword [esp + 0x54]
mov ecx, edi
sub ecx, ebp
lea eax, [ecx + edx]
cmp eax, edi
jbe 0x408fd5
mov eax, edi
mov ecx, dword [esp + 0x10]
push eax
mov eax, ebp
sub eax, edi
push eax
push ecx
lea edx, [esp + 0x34]
push edx
mov ecx, esi
call fcn.0040874f
cmp dword [esp + 0x2c], edi
jb 0x409026
mov eax, dword [esp + 0x28]
push edi
push eax
mov ecx, esi
call fcn.004083c7
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
cmp eax, ebp
mov ebp, dword [esp + 0x58]
jle 0x409026
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x10]
push edi
push ebp
push ecx
mov ecx, esi
call fcn.004080e1
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
cmp eax, ebp
jge 0x4090e9
mov ebp, dword [esp + 0x30]
cmp ebp, dword [esi + 0x424]
jne 0x4090af
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
push edi
push eax
push ecx
mov ecx, esi
call fcn.004080e1
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.004083c7
mov ecx, dword [esp + 0x24]
add ecx, eax
mov edx, ebp
push ebx
inc edx
mov dword [esp + 0x28], ecx
push edx
mov ecx, esi
call fcn.004083c7
mov ebx, eax
mov eax, dword [esp + 0x38]
push edi
push eax
mov ecx, esi
call fcn.004083c7
mov ebp, dword [esp + 0x58]
add ebx, eax
mov eax, dword [esp + 0x24]
cmp eax, ebx
mov ebx, dword [esp + 0x34]
jle 0x4090ed
jmp 0x4090b3
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x4090da
cmp eax, 0x500
jl 0x4090cb
cmp edi, 2
je 0x4090ed
cmp dword [esp + 0x38], 0x7d00
jl 0x4090da
cmp edi, 3
je 0x4090ed
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
call fcn.0040844d
jmp 0x40911c
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x10]
mov edx, ebp
sub edx, edi
push edx
push eax
mov ecx, esi
call fcn.0040813e
mov ecx, dword [esp + 0x10]
inc ecx
dec edi
mov dword [esp + 0x10], ecx
jne 0x4090ed
jmp 0x40911e
mov edx, dword [esp + 0x10]
lea ecx, [ebp - 1]
push ecx
push edx
mov ecx, esi
call fcn.0040813e
xor edi, edi
cmp ebx, 3
jg 0x4091ac
mov eax, dword [esi + 0x414]
push ebx
push ebp
push eax
mov ecx, esi
call fcn.004080e1
mov ecx, dword [esp + 0x30]
push ebx
push ecx
mov ecx, esi
mov ebp, eax
call fcn.004083c7
cmp eax, ebp
jg 0x409169
mov eax, dword [esp + 0x30]
cmp eax, dword [esi + 0x424]
je 0x4091a8
cmp eax, 0x500
jl 0x409162
cmp ebx, 2
je 0x409169
cmp eax, 0x7d00
jl 0x4091a8
test ebx, ebx
mov ebp, dword [esp + 0x58]
je 0x4091a2
mov dword [esp + 0x20], ebx
lea ebx, [ebx]
mov edx, dword [esi + 0x414]
push ebp
push edx
mov ecx, esi
call fcn.0040813e
mov ecx, dword [esi + 0x414]
mov eax, dword [esp + 0x20]
inc ecx
dec eax
mov dword [esi + 0x414], ecx
mov dword [esp + 0x20], eax
jne 0x40917b
lea ebp, [ebx + ebp - 1]
jmp 0x40920b
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.0040844d
mov eax, dword [esi + 0x414]
add eax, ebx
lea ebp, [ebx + ebp - 1]
jmp 0x409205
test edi, edi
jne 0x4091e1
mov ecx, dword [esp + 0x30]
mov edx, dword [esi + 0x414]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x10], edx
mov ebp, dword [esp + 0x58]
inc edi
jmp 0x4091fe
test edi, edi
je 0x4091ef
inc edi
jmp 0x4091fe
mov eax, dword [esi + 0x414]
push ebp
push eax
mov ecx, esi
call fcn.0040813e
mov eax, dword [esi + 0x414]
inc eax
mov dword [esi + 0x414], eax
test edi, edi
je 0x4092e6
cmp edi, dword [esp + 0x3c]
jne 0x4092e6
mov edx, dword [esp + 0x54]
mov ecx, edi
sub ecx, ebp
lea eax, [ecx + edx]
cmp eax, edi
jbe 0x40922e
mov eax, edi
mov ecx, dword [esp + 0x10]
push eax
mov eax, ebp
sub eax, edi
push eax
push ecx
lea edx, [esp + 0x34]
push edx
mov ecx, esi
call fcn.0040874f
cmp dword [esp + 0x2c], edi
jb 0x40927b
mov eax, dword [esp + 0x28]
push edi
push eax
mov ecx, esi
call fcn.004083c7
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebx, eax
call fcn.004083c7
cmp eax, ebx
jle 0x40927b
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x10]
push edi
push ebp
push ecx
mov ecx, esi
call fcn.004080e1
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebx, eax
call fcn.004083c7
cmp eax, ebx
jge 0x4092cd
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x4092c0
cmp eax, 0x500
jl 0x4092b4
cmp edi, 2
je 0x4092cd
cmp eax, 0x7d00
jl 0x4092c0
cmp edi, 3
je 0x4092cd
push edi
push eax
mov ecx, esi
call fcn.0040844d
xor edi, edi
jmp 0x4092e6
mov ebx, dword [esp + 0x10]
mov eax, ebp
sub eax, edi
push eax
push ebx
mov ecx, esi
call fcn.0040813e
inc ebx
dec edi
jne 0x4092d1
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x54]
inc ebp
dec eax
cmp ebp, eax
mov dword [esp + 0x58], ebp
jb 0x408bcb
test edi, edi
je 0x40938c
cmp edi, 1
jbe 0x40937c
mov ecx, dword [esp + 0x10]
push edi
push ebp
push ecx
mov ecx, esi
call fcn.004080e1
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebx, eax
call fcn.004083c7
cmp eax, ebx
jg 0x409362
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x40934a
cmp eax, 0x500
jl 0x40933e
cmp edi, 2
je 0x409362
cmp eax, 0x7d00
jl 0x40934a
cmp edi, 3
je 0x409362
push edi
push eax
mov ecx, esi
call fcn.0040844d
jmp 0x40938c
pop ebx
pop ebp
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x38
ret 0x18
mov ebx, dword [esp + 0x10]
add eax, 0
mov eax, ebp
sub eax, edi
push eax
push ebx
mov ecx, esi
call fcn.0040813e
inc ebx
dec edi
jne 0x409369
jmp 0x40938c
mov edx, dword [esp + 0x10]
lea ecx, [ebp - 1]
push ecx
push edx
mov ecx, esi
call fcn.0040813e
mov edi, dword [esp + 0x54]
cmp ebp, edi
jae 0x4093b8
add eax, 0
mov eax, dword [esi + 0x414]
push ebp
push eax
mov ecx, esi
call fcn.0040813e
mov edx, dword [esi + 0x414]
inc edx
inc ebp
cmp ebp, edi
mov dword [esi + 0x414], edx
jb 0x409397
dec dword [esi + 0x41c]
mov ecx, 8
jne 0x4093de
mov eax, dword [esi + 0x410]
mov dword [esi + 0x418], eax
inc eax
mov dword [esi + 0x41c], ecx
mov dword [esi + 0x410], eax
mov eax, dword [esi + 0x418]
mov dl, byte [eax]
shl dl, 1
inc dl
mov byte [eax], dl
dec dword [esi + 0x41c]
jne 0x40940d
mov eax, dword [esi + 0x410]
mov dword [esi + 0x418], eax
inc eax
mov dword [esi + 0x41c], ecx
mov dword [esi + 0x410], eax
mov eax, dword [esi + 0x418]
mov dl, byte [eax]
shl dl, 1
inc dl
mov byte [eax], dl
dec dword [esi + 0x41c]
jne 0x40943c
mov eax, dword [esi + 0x410]
mov dword [esi + 0x418], eax
inc eax
mov dword [esi + 0x41c], ecx
mov dword [esi + 0x410], eax
mov eax, dword [esi + 0x418]
shl byte [eax], 1
mov eax, dword [esi + 0x410]
mov byte [eax], 0
mov ebp, dword [esi + 0x410]
mov eax, dword [esi + 0x418]
mov ecx, dword [esi + 0x41c]
inc ebp
mov dword [esi + 0x410], ebp
mov dl, byte [eax]
dec ecx
shl dl, cl
mov byte [eax], dl
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4094a0
mov ecx, dword [esp + 0x60]
mov edx, dword [esi + 0x410]
mov ebp, dword [esp + 0x50]
push ecx
mov ecx, dword [esi + 0x414]
sub edx, ebp
push edx
sub ecx, dword [esp + 0x54]
push ecx
push edi
call eax
add esp, 0x10
test eax, eax
je 0x409355
mov eax, dword [esi + 0x410]
sub eax, dword [esp + 0x50]
pop ebx
pop ebp
pop edi
pop esi
add esp, 0x38
ret 0x18