Function at 0x408bbb
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 0x408bd6
pop edi
xor eax, eax
pop esi
add esp, 0x38
ret 0x18
mov eax, dword [esp + 0x44]
cmp eax, edi
je 0x408be6
mov ecx, dword [esp + 0x48]
cmp ecx, edi
jne 0x408bf1
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x38
ret 0x18
push ebp
mov ebp, dword [esp + 0x54]
cmp ebp, edi
jne 0x408c06
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 0x408c20
cmp eax, edi
jne 0x40961b
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 0x408ca2
add edx, 0x400
add ecx, 4
dec ebp
jne 0x408c9e
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 0x4094fc
nop
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x408d81
mov ecx, dword [esp + 0x18]
inc ecx
test cl, cl
mov dword [esp + 0x18], ecx
jne 0x408d81
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 0x4094c5
cmp ebp, dword [esp + 0x1c]
jne 0x408d99
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], edx
jmp 0x408db8
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.004088bf
mov ebx, dword [esp + 0x34]
cmp ebx, 2
jl 0x409358
mov eax, dword [esi + 0x424]
cmp dword [esp + 0x30], eax
mov dword [esp + 0x14], 0
jne 0x408e35
cmp edi, 1
jbe 0x409123
cmp dword [esp + 0x38], eax
je 0x409123
mov eax, dword [esp + 0x10]
push edi
push ebp
push eax
mov ecx, esi
call fcn.00408251
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebp, eax
call fcn.00408537
cmp eax, ebp
jge 0x40911f
mov eax, dword [esp + 0x38]
cmp eax, 0x500
jl 0x408e21
cmp edi, 2
je 0x40911f
cmp eax, 0x7d00
jl 0x408e31
cmp edi, 3
je 0x40911f
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.004088bf
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 0x408e99
call fcn.00408537
mov edx, dword [esp + 0x30]
push ebx
push edx
mov ecx, esi
mov ebp, eax
call fcn.00408537
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 0x408eb8
call fcn.00408537
mov edx, dword [esp + 0x30]
push ebx
push edx
mov ecx, esi
mov ebp, eax
call fcn.00408537
sub eax, ebp
cdq
and edx, 3
add eax, edx
sar eax, 2
add eax, dword [esp + 0x44]
cmp ebx, eax
jge 0x408ec8
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x408efe
mov eax, dword [esp + 0x44]
cmp eax, ebx
jl 0x408efc
push eax
mov eax, dword [esp + 0x44]
push eax
mov ecx, esi
call fcn.00408537
mov ecx, dword [esp + 0x30]
push ebx
push ecx
mov ecx, esi
mov ebp, eax
call fcn.00408537
cmp ebp, eax
jge 0x408efc
mov dword [esp + 0x14], 1
test edi, edi
jne 0x408f51
mov ebp, dword [esp + 0x44]
cmp ebp, ebx
jge 0x408f51
mov edx, dword [esp + 0x58]
mov eax, dword [esi + 0x414]
push 1
push edx
push eax
mov ecx, esi
call fcn.00408251
mov ecx, dword [esp + 0x40]
push ebp
push ecx
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
push ebx
lea ebp, [ecx + eax + 1]
push edx
mov ecx, esi
call fcn.00408537
cmp ebp, eax
jle 0x408f51
mov dword [esp + 0x14], 0
jmp 0x408f5d
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x409337
cmp ebx, 2
jle 0x40911f
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.004088bf
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 0x408fcb
call fcn.00408537
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
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 0x408fff
call fcn.00408537
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
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 0x409009
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x409035
cmp eax, ebx
jl 0x409035
mov edx, dword [esp + 0x28]
push eax
push edx
mov ecx, esi
call fcn.00408537
mov ebp, eax
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.00408537
cmp ebp, eax
jl 0x409337
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x409337
cmp ebx, 3
jle 0x40911f
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.004088bf
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 0x4090a9
call fcn.00408537
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
mov ecx, dword [esp + 0x24]
sub eax, ecx
cdq
and edx, 3
add eax, edx
mov ecx, eax
sar ecx, 2
jmp 0x4090d5
call fcn.00408537
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
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 0x4090e7
mov dword [esp + 0x14], 1
test edi, edi
jbe 0x409113
cmp eax, ebx
jl 0x409113
mov edx, dword [esp + 0x28]
push eax
push edx
mov ecx, esi
call fcn.00408537
mov ebp, eax
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.00408537
cmp ebp, eax
jl 0x409337
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x409337
mov ebp, dword [esp + 0x58]
test edi, edi
je 0x40928e
cmp edi, 1
jbe 0x40927c
mov edx, dword [esp + 0x54]
mov ecx, edi
sub ecx, ebp
lea eax, [ecx + edx]
cmp eax, edi
jbe 0x409145
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.004088bf
cmp dword [esp + 0x2c], edi
jb 0x409196
mov eax, dword [esp + 0x28]
push edi
push eax
mov ecx, esi
call fcn.00408537
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebp, eax
call fcn.00408537
cmp eax, ebp
mov ebp, dword [esp + 0x58]
jle 0x409196
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.00408251
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebp, eax
call fcn.00408537
cmp eax, ebp
jge 0x409259
mov ebp, dword [esp + 0x30]
cmp ebp, dword [esi + 0x424]
jne 0x40921f
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x10]
push edi
push eax
push ecx
mov ecx, esi
call fcn.00408251
push ebx
push ebp
mov ecx, esi
mov dword [esp + 0x2c], eax
call fcn.00408537
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.00408537
mov ebx, eax
mov eax, dword [esp + 0x38]
push edi
push eax
mov ecx, esi
call fcn.00408537
mov ebp, dword [esp + 0x58]
add ebx, eax
mov eax, dword [esp + 0x24]
cmp eax, ebx
mov ebx, dword [esp + 0x34]
jle 0x40925d
jmp 0x409223
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x40924a
cmp eax, 0x500
jl 0x40923b
cmp edi, 2
je 0x40925d
cmp dword [esp + 0x38], 0x7d00
jl 0x40924a
cmp edi, 3
je 0x40925d
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
call fcn.004085bd
jmp 0x40928c
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.004082ae
mov ecx, dword [esp + 0x10]
inc ecx
dec edi
mov dword [esp + 0x10], ecx
jne 0x40925d
jmp 0x40928e
mov edx, dword [esp + 0x10]
lea ecx, [ebp - 1]
push ecx
push edx
mov ecx, esi
call fcn.004082ae
xor edi, edi
cmp ebx, 3
jg 0x40931c
mov eax, dword [esi + 0x414]
push ebx
push ebp
push eax
mov ecx, esi
call fcn.00408251
mov ecx, dword [esp + 0x30]
push ebx
push ecx
mov ecx, esi
mov ebp, eax
call fcn.00408537
cmp eax, ebp
jg 0x4092d9
mov eax, dword [esp + 0x30]
cmp eax, dword [esi + 0x424]
je 0x409318
cmp eax, 0x500
jl 0x4092d2
cmp ebx, 2
je 0x4092d9
cmp eax, 0x7d00
jl 0x409318
test ebx, ebx
mov ebp, dword [esp + 0x58]
je 0x409312
mov dword [esp + 0x20], ebx
lea ebx, [ebx]
mov edx, dword [esi + 0x414]
push ebp
push edx
mov ecx, esi
call fcn.004082ae
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 0x4092eb
lea ebp, [ebx + ebp - 1]
jmp 0x40937b
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x30]
push ebx
push eax
mov ecx, esi
call fcn.004085bd
mov eax, dword [esi + 0x414]
add eax, ebx
lea ebp, [ebx + ebp - 1]
jmp 0x409375
test edi, edi
jne 0x409351
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 0x40936e
test edi, edi
je 0x40935f
inc edi
jmp 0x40936e
mov eax, dword [esi + 0x414]
push ebp
push eax
mov ecx, esi
call fcn.004082ae
mov eax, dword [esi + 0x414]
inc eax
mov dword [esi + 0x414], eax
test edi, edi
je 0x409456
cmp edi, dword [esp + 0x3c]
jne 0x409456
mov edx, dword [esp + 0x54]
mov ecx, edi
sub ecx, ebp
lea eax, [ecx + edx]
cmp eax, edi
jbe 0x40939e
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.004088bf
cmp dword [esp + 0x2c], edi
jb 0x4093eb
mov eax, dword [esp + 0x28]
push edi
push eax
mov ecx, esi
call fcn.00408537
mov ecx, dword [esp + 0x38]
push edi
push ecx
mov ecx, esi
mov ebx, eax
call fcn.00408537
cmp eax, ebx
jle 0x4093eb
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.00408251
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebx, eax
call fcn.00408537
cmp eax, ebx
jge 0x40943d
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x409430
cmp eax, 0x500
jl 0x409424
cmp edi, 2
je 0x40943d
cmp eax, 0x7d00
jl 0x409430
cmp edi, 3
je 0x40943d
push edi
push eax
mov ecx, esi
call fcn.004085bd
xor edi, edi
jmp 0x409456
mov ebx, dword [esp + 0x10]
mov eax, ebp
sub eax, edi
push eax
push ebx
mov ecx, esi
call fcn.004082ae
inc ebx
dec edi
jne 0x409441
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x54]
inc ebp
dec eax
cmp ebp, eax
mov dword [esp + 0x58], ebp
jb 0x408d3b
test edi, edi
je 0x4094fc
cmp edi, 1
jbe 0x4094ec
mov ecx, dword [esp + 0x10]
push edi
push ebp
push ecx
mov ecx, esi
call fcn.00408251
mov edx, dword [esp + 0x38]
push edi
push edx
mov ecx, esi
mov ebx, eax
call fcn.00408537
cmp eax, ebx
jg 0x4094d2
mov eax, dword [esp + 0x38]
cmp eax, dword [esi + 0x424]
je 0x4094ba
cmp eax, 0x500
jl 0x4094ae
cmp edi, 2
je 0x4094d2
cmp eax, 0x7d00
jl 0x4094ba
cmp edi, 3
je 0x4094d2
push edi
push eax
mov ecx, esi
call fcn.004085bd
jmp 0x4094fc
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.004082ae
inc ebx
dec edi
jne 0x4094d9
jmp 0x4094fc
mov edx, dword [esp + 0x10]
lea ecx, [ebp - 1]
push ecx
push edx
mov ecx, esi
call fcn.004082ae
mov edi, dword [esp + 0x54]
cmp ebp, edi
jae 0x409528
add eax, 0
mov eax, dword [esi + 0x414]
push ebp
push eax
mov ecx, esi
call fcn.004082ae
mov edx, dword [esi + 0x414]
inc edx
inc ebp
cmp ebp, edi
mov dword [esi + 0x414], edx
jb 0x409507
dec dword [esi + 0x41c]
mov ecx, 8
jne 0x40954e
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 0x40957d
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 0x4095ac
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 0x409610
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 0x4094c5
mov eax, dword [esi + 0x410]
sub eax, dword [esp + 0x50]
pop ebx
pop ebp
pop edi
pop esi
add esp, 0x38
ret 0x18