Function at 0x405250
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x14]
movzx ecx, word [eax*2 + 0x416ca8]
mov edx, dword [ebp + 0x18]
movzx eax, word [edx*2 + 0x416ca8]
push ebx
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp + 0x1c]
movzx edx, word [ecx*2 + 0x416ca8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x28], eax
mov eax, dword [0x5f6400]
cmp eax, edi
mov dword [ebp - 8], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], eax
jle 0x405adc
mov esi, dword [0x5ee3f4]
cmp edi, 1
jae 0x40531c
mov ebx, dword [0x5ee3ec]
cmp esi, dword [0x5ee3f0]
jae 0x4052c4
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x405304
cmp ebx, 8
jb 0x405347
mov ebx, 8
mov eax, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push eax
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
mov ebx, dword [0x5ee3ec]
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, 1
jb 0x4052b3
mov dword [0x5ee3f4], esi
dec edi
test byte [ebp - 4], 1
je 0x405549
shr dword [ebp - 4], 1
dec dword [ebp - 0x18]
cmp edi, dword [ebp + 0x14]
jae 0x4053b3
cmp esi, dword [0x5ee3f0]
jae 0x40534f
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x40539b
test ebx, ebx
jne 0x4052ce
xor al, al
jmp 0x405304
cmp dword [0x5ee3ec], 8
jae 0x405366
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x40536b
xor al, al
jmp 0x40539b
mov ebx, 8
mov eax, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push eax
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp + 0x14]
jb 0x405336
mov dword [0x5ee3f4], esi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
not eax
and eax, dword [ebp - 0x20]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
movzx eax, byte [edx + 4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x4054ad
jmp 0x4053e3
mov eax, dword [ebp - 0xc]
cmp eax, 0x63
je 0x405b02
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x405479
cmp esi, dword [0x5ee3f0]
jae 0x405414
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x405461
cmp dword [0x5ee3ec], 8
jae 0x40542b
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x405430
xor al, al
jmp 0x405461
mov ebx, 8
mov edx, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push edx
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp - 0xc]
jb 0x405403
mov dword [0x5ee3f4], esi
mov ecx, dword [ebp - 0xc]
movzx eax, word [ecx*2 + 0x416ca8]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
not edx
and eax, edx
mov edx, dword [ecx + 8]
lea eax, [eax + eax*2]
lea eax, [edx + eax*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x4053e0
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
mov eax, dword [ebp - 8]
sub edi, ecx
mov cl, byte [edx + 8]
mov byte [eax + 0x5ee400], cl
inc eax
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x405ad2
mov ebx, dword [0x5f6434]
mov edx, dword [0x5f640c]
mov dword [ebp - 0xc], edx
test ebx, ebx
je 0x40550e
mov esi, ebx
cmp ebx, eax
jb 0x4054ec
mov esi, eax
mov eax, dword [0x5f6438]
push esi
push 0x5ee400
push eax
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6438], esi
mov dword [0x5f6434], ebx
mov ecx, dword [ebp - 8]
jcxz 0x405533
mov esi, 0x5ee400
mov ebx, dword [ebp - 0xc]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6440]
loop 0x40551c
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword [0x5f640c], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], eax
jmp 0x405acc
shr dword [ebp - 4], 1
cmp edi, 7
jae 0x4055c7
cmp esi, dword [0x5ee3f0]
jae 0x405562
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x4055af
cmp dword [0x5ee3ec], 8
jae 0x405579
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x40557e
xor al, al
jmp 0x4055af
mov ebx, 8
mov edx, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push edx
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, 7
jb 0x405551
mov dword [0x5ee3f4], esi
mov ecx, dword [ebp - 4]
mov eax, ecx
and eax, 0x7f
shr ecx, 7
sub edi, 7
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], ecx
cmp edi, dword [ebp + 0x1c]
jae 0x405656
cmp esi, dword [0x5ee3f0]
jae 0x4055f1
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x40563e
cmp dword [0x5ee3ec], 8
jae 0x405608
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x40560d
xor al, al
jmp 0x40563e
mov ebx, 8
mov ecx, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push ecx
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp + 0x1c]
jb 0x4055e0
mov dword [0x5ee3f4], esi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
not eax
and eax, dword [ebp - 0x24]
lea eax, [eax + eax*2]
lea edx, [ecx + eax*4]
movzx eax, byte [edx + 4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x40574a
jmp 0x405683
mov eax, dword [ebp - 0xc]
cmp eax, 0x63
je 0x405b02
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x405716
nop
cmp esi, dword [0x5ee3f0]
jae 0x4056b1
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x4056fe
cmp dword [0x5ee3ec], 8
jae 0x4056c8
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x4056cd
xor al, al
jmp 0x4056fe
mov ebx, 8
mov edx, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push edx
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp - 0xc]
jb 0x4056a0
mov dword [0x5ee3f4], esi
mov ecx, dword [ebp - 0xc]
movzx eax, word [ecx*2 + 0x416ca8]
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
not edx
and eax, edx
mov edx, dword [ecx + 8]
lea eax, [eax + eax*2]
lea eax, [edx + eax*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x405680
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
mov eax, dword [ebp - 8]
sub edi, ecx
movzx ecx, word [edx + 8]
sub eax, ecx
sub eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
cmp edi, dword [ebp + 0x18]
jae 0x4057de
mov ebx, dword [0x5ee3ec]
lea ecx, [ecx]
cmp esi, dword [0x5ee3f0]
jae 0x405781
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x4057c6
cmp ebx, 8
jb 0x405831
mov ebx, 8
mov edx, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push edx
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
mov ebx, dword [0x5ee3ec]
movzx eax, al
mov ecx, edi
shl eax, cl
add edi, 8
or dword [ebp - 4], eax
cmp edi, dword [ebp + 0x18]
jb 0x405770
mov dword [0x5ee3f4], esi
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
not eax
and eax, dword [ebp - 0x28]
lea ecx, [eax + eax*2]
movzx eax, byte [edx + ecx*4 + 4]
lea edx, [edx + ecx*4]
mov dword [ebp - 0x10], edx
cmp eax, 0x10
jbe 0x4058d5
cmp eax, 0x63
je 0x405b02
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
sub eax, 0x10
sub edi, ecx
mov dword [ebp - 0xc], eax
cmp edi, eax
jae 0x4058a1
cmp esi, dword [0x5ee3f0]
jae 0x40583d
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x405889
test ebx, ebx
jne 0x40578f
xor al, al
jmp 0x4057c6
cmp dword [0x5ee3ec], 8
jae 0x405854
mov ebx, dword [0x5ee3ec]
test ebx, ebx
jne 0x405859
xor al, al
jmp 0x405889
mov ebx, 8
mov eax, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push eax
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, dword [ebp - 0xc]
jb 0x405820
mov dword [0x5ee3f4], esi
mov eax, dword [ebp - 0xc]
movzx eax, word [eax*2 + 0x416ca8]
mov ecx, dword [ebp - 4]
not ecx
and eax, ecx
lea edx, [eax + eax*2]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 8]
lea eax, [ecx + edx*4]
mov dword [ebp - 0x10], eax
movzx eax, byte [eax + 4]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp eax, 0x10
ja 0x405800
movzx ecx, byte [edx + 5]
shr dword [ebp - 4], cl
movzx ecx, byte [edx + 5]
movzx edx, word [edx + 8]
sub edi, ecx
mov dword [ebp - 0x10], edx
test eax, eax
je 0x40597f
cmp edi, 8
jae 0x40596d
mov ebx, dword [0x5ee3ec]
lea esp, [esp]
cmp esi, dword [0x5ee3f0]
jae 0x405911
mov al, byte [esi + 0x5ee3f8]
inc esi
jmp 0x405955
cmp ebx, 8
jb 0x4059d1
mov ebx, 8
mov eax, dword [0x5ee3dc]
sub dword [0x5ee3ec], ebx
push ebx
push eax
push 0x5ee3f8
mov esi, 1
mov dword [0x5ee3f0], ebx
call fcn.0040cb60
mov al, byte [0x5ee3f8]
add esp, 0xc
add dword [0x5ee3dc], ebx
mov ebx, dword [0x5ee3ec]
movzx edx, al
mov ecx, edi
shl edx, cl
add edi, 8
or dword [ebp - 4], edx
cmp edi, 8
jb 0x405900
mov dword [0x5ee3f4], esi
mov eax, dword [ebp - 4]
movzx ecx, al
add dword [ebp - 0x10], ecx
shr eax, 8
mov dword [ebp - 4], eax
sub edi, 8
mov ebx, dword [ebp - 0x10]
sub dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
jmp 0x405990
and ecx, 0x7fff
mov dword [ebp - 0x14], ecx
mov edx, ecx
cmp ecx, eax
ja 0x4059a1
mov edx, eax
mov esi, 0x8000
sub esi, edx
cmp esi, ebx
jbe 0x4059ae
mov esi, ebx
sub ebx, esi
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], ebx
je 0x4059e0
cmp eax, ecx
ja 0x4059e0
mov ebx, dword [ebp - 8]
push esi
lea edx, [ebx + 0x5ee400]
push 0
push edx
call fcn.00410d00
jmp 0x405a02
test ebx, ebx
jne 0x40591f
xor al, al
jmp 0x405955
mov edx, eax
sub edx, ecx
cmp edx, esi
jb 0x405a20
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 8]
push esi
lea ecx, [eax + 0x5ee400]
push ecx
lea edx, [ebx + 0x5ee400]
push edx
call fcn.0040cb60
add ebx, esi
add esp, 0xc
add dword [ebp - 0x14], esi
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], ebx
mov eax, ebx
jmp 0x405a39
mov dl, byte [ecx + 0x5ee400]
mov byte [eax + 0x5ee400], dl
inc eax
inc ecx
sub esi, 1
jne 0x405a20
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], eax
cmp eax, 0x8000
jne 0x405ac1
mov ebx, dword [0x5f6434]
mov eax, dword [0x5f640c]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x405a88
mov esi, ebx
cmp ebx, 0x8000
jb 0x405a65
mov esi, 0x8000
mov ecx, dword [0x5f6438]
push esi
push 0x5ee400
push ecx
call fcn.0040cb60
sub ebx, esi
add esp, 0xc
add dword [0x5f6438], esi
mov dword [0x5f6434], ebx
mov ecx, dword [ebp - 8]
jcxz 0x405aad
mov esi, 0x5ee400
mov ebx, dword [ebp - 0x1c]
lodsb al, byte [esi]
xor al, bl
and eax, 0xff
shr ebx, 8
xor ebx, dword [eax*4 + 0x5f6440]
loop 0x405a96
mov dword [ebp - 0x1c], ebx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov dword [0x5f640c], edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jne 0x405990
mov esi, dword [0x5ee3f4]
cmp dword [ebp - 0x18], 0
jg 0x4052a8
mov eax, dword [ebp - 8]
mov ecx, dword [0x5f640c]
push eax
push 0x5ee400
push ecx
call fcn.00403ef0
add esp, 0xc
pop edi
pop esi
mov dword [0x5f640c], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret