Function at 0x404ebd
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x2c
push ebx
push ebp
push esi
xor esi, esi
cmp eax, esi
push edi
jne 0x404ed8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov ecx, dword [esp + 0x44]
cmp ecx, esi
jne 0x404eea
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov ebp, dword [esp + 0x48]
cmp ebp, 2
jae 0x404efd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov edx, dword [esp + 0x4c]
cmp edx, esi
jne 0x404f0f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov dword [0x407e60], eax
dec eax
mov dword [0x407e6c], eax
mov dword [0x407e5c], ecx
mov eax, 0xfeedabee
xor ecx, ecx
mov edi, eax
add eax, eax
shr edi, 0x1f
or edi, eax
xor eax, eax
mov al, byte [ecx + 0x40742c]
xor eax, edi
inc ecx
cmp ecx, 0x100
jb 0x404f27
cmp eax, esi
jne 0x4058c6
mov dword [0x407a4c], edx
mov ecx, 0x407a50
add edx, 0x5a018
mov dword [ecx], edx
xor eax, eax
mov edi, dword [ecx]
add eax, 4
cmp eax, 0x400
mov dword [eax + edi - 4], esi
jb 0x404f60
add ecx, 4
add edx, 0x400
cmp ecx, 0x407e50
jb 0x404f5c
mov ecx, dword [0x407e60]
mov edx, dword [0x407a4c]
or eax, 0xffffffff
mov edi, 1
mov dword [0x407e70], eax
mov dword [0x407e50], edi
mov dword [0x407e58], esi
mov dword [0x407e54], ecx
mov dword [edx], esi
mov ecx, dword [0x407e60]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x14], esi
mov dl, byte [ecx]
mov ecx, dword [0x407e5c]
mov dword [esp + 0x18], eax
mov byte [ecx], dl
mov edx, dword [0x407e60]
mov ecx, dword [0x407e5c]
inc edx
inc ecx
cmp ebp, edi
mov dword [0x407e60], edx
mov dword [0x407e5c], ecx
mov dword [0x407e68], edi
jbe 0x4057b8
jmp 0x405000
mov edx, dword [0x407e60]
mov ecx, dword [0x407e5c]
mov eax, dword [esp + 0x50]
test eax, eax
je 0x405031
mov ebx, dword [esp + 0x14]
inc ebx
test bl, 0x7f
mov dword [esp + 0x14], ebx
jne 0x405031
mov ebp, dword [esp + 0x44]
sub ecx, ebp
mov ebp, dword [esp + 0x40]
sub edx, ebp
push ecx
push edx
call eax
add esp, 8
test eax, eax
je 0x4058b1
cmp edi, dword [esp + 0x18]
jne 0x405049
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edx
jmp 0x405069
mov eax, dword [esp + 0x48]
mov ecx, dword [0x407e60]
sub eax, edi
lea edx, [esp + 0x1c]
push eax
push edi
push ecx
push edx
call fcn.00404bc1
mov eax, dword [esp + 0x30]
add esp, 0x10
cmp eax, 2
jl 0x405641
mov ecx, dword [0x407e70]
mov edx, dword [esp + 0x1c]
cmp edx, ecx
mov dword [esp + 0x10], 0
jne 0x4050e1
cmp esi, 1
jbe 0x405412
cmp dword [esp + 0x2c], ecx
je 0x405412
mov eax, dword [esp + 0x4c]
push esi
push edi
push eax
call fcn.004041f0
mov ebx, dword [esp + 0x38]
push esi
push ebx
mov ebp, eax
call fcn.00404557
add esp, 0x14
cmp eax, ebp
jge 0x40540e
cmp ebx, 0x500
jl 0x4050d0
cmp esi, 2
je 0x40540e
cmp ebx, 0x7d00
jl 0x4050e1
cmp esi, 3
je 0x40540e
mov ebp, dword [esp + 0x48]
mov edx, dword [0x407e60]
sub ebp, edi
lea ebx, [edi + 1]
inc edx
lea eax, [esp + 0x34]
lea ecx, [ebp - 1]
push ecx
push ebx
push edx
push eax
call fcn.00404bc1
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
add esp, 0x10
cmp eax, ecx
mov dword [esp + 0x18], ebx
jl 0x405159
mov ecx, dword [esp + 0x38]
push ecx
push eax
call fcn.00404557
mov edx, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.00404557
mov ecx, eax
mov eax, 0x38e38e39
sub ecx, ebx
add esp, 0x10
shl ecx, 1
imul ecx
sar edx, 1
mov eax, dword [esp + 0x20]
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x38]
add edx, ecx
cmp eax, edx
jge 0x405199
jmp 0x405191
mov edx, dword [esp + 0x38]
push edx
push eax
call fcn.00404557
mov ecx, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.00404557
sub eax, ebx
mov ecx, dword [esp + 0x48]
cdq
and edx, 3
add esp, 0x10
add edx, eax
mov eax, dword [esp + 0x20]
sar edx, 2
add edx, ecx
cmp eax, edx
jge 0x405199
mov dword [esp + 0x10], 1
test esi, esi
jbe 0x4051d2
cmp ecx, eax
jl 0x4051d0
mov eax, dword [esp + 0x34]
push ecx
push eax
call fcn.00404557
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ecx
push edx
mov ebx, eax
call fcn.00404557
add esp, 0x10
cmp ebx, eax
jge 0x4051cc
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x20]
test esi, esi
jne 0x405225
cmp dword [esp + 0x38], eax
jge 0x405225
mov eax, dword [0x407e60]
push 1
push edi
push eax
call fcn.004041f0
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push ecx
push edx
mov ebx, eax
call fcn.00404557
mov ecx, dword [esp + 0x30]
lea ebx, [ebx + eax + 1]
mov eax, dword [esp + 0x34]
push eax
push ecx
call fcn.00404557
add esp, 0x1c
cmp ebx, eax
jle 0x405221
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], 0
jmp 0x405231
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x40560a
cmp eax, 2
jle 0x405412
mov ecx, dword [0x407e60]
lea edx, [ebp - 2]
lea eax, [edi + 2]
push edx
add ecx, 2
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
call fcn.00404bc1
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
add esp, 0x10
cmp eax, ecx
mov ecx, dword [esp + 0x28]
push ecx
push eax
jl 0x405291
call fcn.00404557
mov edx, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.00404557
sub eax, ebx
add esp, 0x10
cdq
and edx, 3
add edx, eax
sar edx, 2
jmp 0x4052c0
call fcn.00404557
mov edx, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.00404557
mov ecx, eax
mov eax, 0x2e8ba2e9
sub ecx, ebx
add esp, 0x10
shl ecx, 1
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
add edx, ecx
cmp eax, edx
jge 0x4052d9
mov ebx, 1
mov dword [esp + 0x10], ebx
jmp 0x4052dd
mov ebx, dword [esp + 0x10]
test esi, esi
jbe 0x405314
cmp ecx, eax
jl 0x405314
mov edx, dword [esp + 0x24]
push ecx
push edx
call fcn.00404557
mov ecx, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.00404557
add esp, 0x10
cmp ebx, eax
jl 0x405606
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x40560a
cmp eax, 3
jle 0x405412
mov eax, dword [0x407e60]
add ebp, 0xfffffffd
lea edx, [edi + 3]
push ebp
add eax, 3
push edx
lea ecx, [esp + 0x2c]
push eax
push ecx
call fcn.00404bc1
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
add esp, 0x10
cmp eax, ecx
jl 0x405389
mov edx, dword [esp + 0x28]
push edx
push eax
call fcn.00404557
mov ecx, dword [esp + 0x24]
mov ebp, eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.00404557
sub eax, ebp
mov ecx, dword [esp + 0x38]
cdq
and edx, 3
add esp, 0x10
add edx, eax
mov eax, dword [esp + 0x20]
sar edx, 2
add edx, ecx
cmp eax, edx
jge 0x4053d1
jmp 0x4053cc
mov ecx, dword [esp + 0x28]
push ecx
push eax
call fcn.00404557
mov edx, dword [esp + 0x28]
mov ebp, eax
mov eax, dword [esp + 0x24]
push edx
push eax
call fcn.00404557
mov ecx, eax
mov eax, 0x2e8ba2e9
sub ecx, ebp
add esp, 0x10
shl ecx, 1
imul ecx
sar edx, 1
mov eax, dword [esp + 0x20]
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, dword [esp + 0x28]
add edx, ecx
cmp eax, edx
jge 0x4053d1
mov ebx, 1
test esi, esi
jbe 0x405404
cmp ecx, eax
jl 0x405404
mov edx, dword [esp + 0x24]
push ecx
push edx
call fcn.00404557
mov ecx, dword [esp + 0x24]
mov ebp, eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.00404557
add esp, 0x10
cmp ebp, eax
jl 0x405606
mov eax, dword [esp + 0x20]
test ebx, ebx
jne 0x40560a
jmp 0x405412
mov eax, dword [esp + 0x20]
test esi, esi
je 0x40555a
cmp esi, 1
jbe 0x405544
mov eax, dword [esp + 0x48]
mov edx, esi
sub edx, edi
add eax, edx
cmp eax, esi
jbe 0x405433
mov eax, esi
mov ebx, dword [esp + 0x4c]
mov ecx, edi
sub ecx, esi
push eax
push ecx
lea edx, [esp + 0x2c]
push ebx
push edx
call fcn.00404bc1
mov eax, dword [esp + 0x38]
add esp, 0x10
cmp eax, esi
jb 0x405482
mov eax, dword [esp + 0x24]
push esi
push eax
call fcn.00404557
mov ecx, dword [esp + 0x34]
push esi
push ecx
mov ebp, eax
call fcn.00404557
add esp, 0x10
cmp eax, ebp
jle 0x405482
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
push esi
push edi
push ebx
call fcn.004041f0
mov ecx, dword [esp + 0x38]
push esi
push ecx
mov ebp, eax
call fcn.00404557
add esp, 0x14
cmp eax, ebp
jge 0x40552c
mov edx, dword [esp + 0x1c]
mov eax, dword [0x407e70]
cmp edx, eax
jne 0x4054f4
push esi
push edi
push ebx
call fcn.004041f0
mov ecx, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00404557
mov edx, dword [esp + 0x34]
add ebx, eax
mov eax, dword [esp + 0x30]
push edx
inc eax
push eax
call fcn.00404557
mov ecx, dword [esp + 0x48]
push esi
push ecx
mov ebp, eax
call fcn.00404557
add ebp, eax
add esp, 0x24
cmp ebx, ebp
mov ebx, dword [esp + 0x4c]
jle 0x40552c
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x407e70]
cmp eax, ecx
je 0x40551a
cmp eax, 0x500
jl 0x40550e
cmp esi, 2
je 0x40552c
cmp eax, 0x7d00
jl 0x40551a
cmp esi, 3
je 0x40552c
push esi
push eax
call fcn.004048af
mov eax, dword [esp + 0x28]
add esp, 8
xor esi, esi
jmp 0x40555e
push edi
push ebx
call fcn.0040423a
add esp, 8
inc ebx
dec esi
jne 0x40552c
mov eax, dword [esp + 0x20]
mov dword [esp + 0x4c], ebx
jmp 0x40555e
mov ebx, dword [esp + 0x4c]
push edi
push ebx
call fcn.0040423a
mov eax, dword [esp + 0x28]
add esp, 8
xor esi, esi
jmp 0x40555e
mov ebx, dword [esp + 0x4c]
cmp eax, 3
jg 0x4055e0
mov edx, dword [0x407e60]
push eax
push edi
push edx
call fcn.004041f0
mov ecx, dword [esp + 0x28]
mov ebp, eax
mov eax, dword [esp + 0x2c]
push eax
push ecx
call fcn.00404557
add esp, 0x14
cmp eax, ebp
mov eax, dword [esp + 0x20]
jg 0x4055b0
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x407e70]
cmp ecx, edx
je 0x4055e4
cmp ecx, 0x500
jl 0x4055a8
cmp eax, 2
je 0x4055b0
cmp ecx, 0x7d00
jl 0x4055e4
test eax, eax
je 0x4055da
mov ebx, eax
mov edx, dword [0x407e60]
push edi
push edx
call fcn.0040423a
mov ecx, dword [0x407e60]
add esp, 8
inc ecx
dec ebx
mov dword [0x407e60], ecx
jne 0x4055b6
mov eax, dword [esp + 0x20]
lea edi, [edi + eax - 1]
jmp 0x40565e
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call fcn.004048af
mov eax, dword [esp + 0x28]
mov ecx, dword [0x407e60]
add esp, 8
add ecx, eax
mov dword [0x407e60], ecx
lea edi, [edi + eax - 1]
jmp 0x405662
mov eax, dword [esp + 0x20]
test esi, esi
jne 0x40562f
mov ebx, dword [0x407e60]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
inc esi
mov dword [esp + 0x2c], eax
mov eax, ebx
inc eax
mov dword [esp + 0x4c], ebx
mov dword [0x407e60], eax
jmp 0x405662
mov eax, dword [0x407e60]
mov ebx, dword [esp + 0x4c]
inc esi
inc eax
mov dword [0x407e60], eax
jmp 0x405662
test esi, esi
je 0x405648
inc esi
jmp 0x405658
mov ecx, dword [0x407e60]
push edi
push ecx
call fcn.0040423a
add esp, 8
inc dword [0x407e60]
mov ebx, dword [esp + 0x4c]
test esi, esi
je 0x405731
cmp esi, dword [esp + 0x30]
jne 0x405731
mov eax, dword [esp + 0x48]
mov edx, esi
sub edx, edi
add eax, edx
cmp eax, esi
jbe 0x405684
mov eax, esi
mov ecx, edi
push eax
sub ecx, esi
lea edx, [esp + 0x28]
push ecx
push ebx
push edx
call fcn.00404bc1
mov eax, dword [esp + 0x38]
add esp, 0x10
cmp eax, esi
jb 0x4056cf
mov eax, dword [esp + 0x24]
push esi
push eax
call fcn.00404557
mov ecx, dword [esp + 0x34]
push esi
push ecx
mov ebp, eax
call fcn.00404557
add esp, 0x10
cmp eax, ebp
jle 0x4056cf
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], eax
push esi
push edi
push ebx
call fcn.004041f0
mov ecx, dword [esp + 0x38]
push esi
push ecx
mov ebp, eax
call fcn.00404557
add esp, 0x14
cmp eax, ebp
jge 0x40571f
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x407e70]
cmp eax, ecx
je 0x405711
cmp eax, 0x500
jl 0x405705
cmp esi, 2
je 0x40571f
cmp eax, 0x7d00
jl 0x405711
cmp esi, 3
je 0x40571f
push esi
push eax
call fcn.004048af
add esp, 8
xor esi, esi
jmp 0x405731
push edi
push ebx
call fcn.0040423a
add esp, 8
inc ebx
dec esi
mov dword [esp + 0x4c], ebx
jne 0x40571f
mov eax, dword [esp + 0x48]
inc edi
cmp edi, eax
jb 0x404ff4
test esi, esi
je 0x4057b8
cmp esi, 1
jbe 0x4057aa
mov ebx, dword [esp + 0x4c]
push esi
push edi
push ebx
call fcn.004041f0
mov edx, dword [esp + 0x38]
push esi
push edx
mov ebp, eax
call fcn.00404557
add esp, 0x14
cmp eax, ebp
jg 0x405796
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x407e70]
cmp eax, ecx
je 0x40578d
cmp eax, 0x500
jl 0x405781
cmp esi, 2
je 0x405796
cmp eax, 0x7d00
jl 0x40578d
cmp esi, 3
je 0x405796
push esi
push eax
call fcn.004048af
jmp 0x4057b5
test esi, esi
jbe 0x4057b8
push edi
push ebx
call fcn.0040423a
add esp, 8
inc ebx
dec esi
jne 0x40579a
jmp 0x4057b8
mov eax, dword [esp + 0x4c]
push edi
push eax
call fcn.0040423a
add esp, 8
mov eax, dword [0x407e68]
mov edx, 8
dec eax
mov dword [0x407e68], eax
jne 0x4057e6
mov ecx, dword [0x407e5c]
mov dword [0x407e68], edx
mov eax, ecx
inc ecx
mov dword [0x407e64], eax
mov dword [0x407e5c], ecx
jmp 0x4057eb
mov eax, dword [0x407e64]
mov cl, byte [eax]
shl cl, 1
inc cl
mov byte [eax], cl
mov eax, dword [0x407e68]
dec eax
mov dword [0x407e68], eax
jne 0x40581c
mov ecx, dword [0x407e5c]
mov dword [0x407e68], edx
mov eax, ecx
inc ecx
mov dword [0x407e64], eax
mov dword [0x407e5c], ecx
jmp 0x405821
mov eax, dword [0x407e64]
mov cl, byte [eax]
shl cl, 1
inc cl
mov byte [eax], cl
mov eax, dword [0x407e68]
dec eax
mov dword [0x407e68], eax
jne 0x405852
mov ecx, dword [0x407e5c]
mov dword [0x407e68], edx
mov eax, ecx
inc ecx
mov dword [0x407e64], eax
mov dword [0x407e5c], ecx
jmp 0x405857
mov eax, dword [0x407e64]
mov bl, byte [eax]
shl bl, 1
mov byte [eax], bl
mov edx, dword [0x407e5c]
mov byte [edx], 0
mov eax, dword [0x407e68]
mov esi, dword [0x407e5c]
lea ecx, [eax - 1]
mov eax, dword [0x407e64]
inc esi
mov dword [0x407e5c], esi
mov dl, byte [eax]
shl dl, cl
mov byte [eax], dl
mov eax, dword [esp + 0x50]
test eax, eax
je 0x4058bb
mov ecx, dword [0x407e5c]
mov ebp, dword [esp + 0x44]
mov edx, dword [0x407e60]
mov edi, dword [esp + 0x40]
sub ecx, ebp
sub edx, edi
push ecx
push edx
call eax
add esp, 8
test eax, eax
jne 0x4058bb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov eax, dword [0x407e5c]
mov ecx, dword [esp + 0x44]
sub eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret