Function at 0x583740
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x22
push 0
push 0
dec ecx
jne 0x583749
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov esi, edx
lea edi, [ebp - 0x43]
push ecx
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
pop ecx
movsw word es:[edi], word [esi]
mov edi, ecx
mov esi, eax
xor eax, eax
push ebp
push 0x583e62
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x29]
add eax, 0xfffffffe
sub eax, 5
jb 0x583795
sub eax, 2
je 0x583795
add eax, 0xfffffff5
sub eax, 3
jae 0x58388e
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x21]
call fcn.004055c4
mov ebx, dword [ebp - 0x21]
test ebx, ebx
jle 0x5837d8
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 4]
call fcn.00405490
mov edx, dword [ebp - 0x1c]
lea eax, [eax + edx - 1]
push eax
mov eax, dword [ebp - 0x21]
add eax, edi
sub eax, dword [ebp - 0x1c]
mov edx, dword [esi + 0xc2]
mov al, byte [edx + eax]
pop edx
mov byte [edx], al
inc dword [ebp - 0x1c]
dec ebx
jne 0x5837ae
mov al, 1
mov ebx, dword [ebp - 0x21]
test ebx, ebx
jle 0x5837ff
mov dword [ebp - 0x1c], 1
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
cmp byte [edx + ecx - 1], 0
je 0x5837f9
xor eax, eax
jmp 0x5837ff
inc dword [ebp - 0x1c]
dec ebx
jne 0x5837e8
test al, al
je 0x583835
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0x70]
call fcn.0041b3cc
lea eax, [ebp - 0x70]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
mov eax, dword [esi + 0xc2]
mov bl, byte [eax + edi]
test bl, 0x80
jne 0x583878
mov ebx, dword [ebp - 0x21]
test ebx, ebx
jle 0x58388e
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 4]
call fcn.00405490
mov edx, dword [ebp - 0x1c]
lea eax, [eax + edx - 1]
push eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x1c]
mov al, byte [eax + edx - 1]
xor al, 0xff
pop edx
mov byte [edx], al
inc dword [ebp - 0x1c]
dec ebx
jne 0x583851
jmp 0x58388e
lea eax, [ebp - 4]
call fcn.00405490
mov edx, dword [ebp - 0x21]
lea eax, [eax + edx - 1]
push eax
xor bl, 0x80
pop eax
mov byte [eax], bl
mov eax, dword [ebp - 0x29]
mov edx, eax
cmp edx, 0x17
ja case.0x5838a2.0
mov dl, byte [edx + 0x5838a9]
jmp dword [edx*4 + 0x5838c1]
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x21]
call fcn.004055c4
lea eax, [ebp - 4]
call fcn.00405490
mov edx, eax
mov eax, dword [esi + 0xc2]
add eax, edi
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
mov edx, dword [ebp - 4]
mov eax, 0x583e7c
call fcn.0040557c
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x583931
lea eax, [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1c]
dec ecx
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00405498
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea edx, [ebp - 0x84]
mov eax, dword [ebp - 4]
call fcn.0040a208
mov edx, dword [ebp - 0x84]
lea eax, [ebp - 0x80]
call fcn.004173b8
lea eax, [ebp - 0x80]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x1c]
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
mov eax, dword [ebp - 0x29]
cmp eax, 3
jne 0x5839a6
cmp dword [ebp - 0x1c], 0x7fff
jle 0x5839a6
mov edx, 0x7fff
sub edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
cmp eax, 4
jne 0x5839bf
cmp dword [ebp - 0x1c], 0x7fffffff
jle 0x5839bf
mov eax, 0x7fffffff
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], eax
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0x94]
mov edx, dword [ebp - 0x1c]
mov cl, 0xfc
call fcn.00417164
lea eax, [ebp - 0x94]
push eax
push 1
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x10]
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
fld qword [ebp - 0x10]
lea eax, [ebp - 0xa4]
call fcn.0041737c
lea eax, [ebp - 0xa4]
push eax
push 1
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
sub eax, 2
je 0x583a54
sub eax, 0x12
jne 0x583a70
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x1c]
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
fild dword [ebp - 0x1c]
fstp qword [ebp - 0x10]
wait
jmp 0x583a83
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x10]
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
fld qword [ebp - 0x10]
fcomp dword [0x583e80]
fnstsw ax
sahf
je 0x583a9f
fld qword [ebp - 0x10]
fcomp dword [0x583e84]
fnstsw ax
sahf
jne 0x583aa9
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
jmp 0x583ae8
fld qword [ebp - 0x10]
fcomp dword [0x583e88]
fnstsw ax
sahf
je 0x583ae8
mov eax, dword [ebp - 0x29]
mov edx, eax
add edx, 0xffffffec
sub edx, 2
jae 0x583ad1
fld qword [ebp - 0x10]
fdiv dword [0x583e8c]
fstp qword [ebp - 0x10]
wait
sub eax, 2
je 0x583adb
sub eax, 0x13
jne 0x583ae8
fld qword [ebp - 0x10]
fsub dword [0x583e90]
fstp qword [ebp - 0x10]
wait
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
fld qword [ebp - 0x10]
fcomp dword [0x583e88]
fnstsw ax
sahf
je 0x583bac
fld qword [ebp - 0x18]
fcomp dword [0x583e94]
fnstsw ax
sahf
jb 0x583b38
mov cx, 0x1f
mov dx, 0xc
mov ax, 0x270f
call fcn.0040cf60
fcomp qword [ebp - 0x18]
fnstsw ax
sahf
jae 0x583b7c
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x18]
lea eax, [ebp - 0xb8]
call fcn.0040de2c
mov edx, dword [ebp - 0xb8]
lea eax, [ebp - 0xb4]
call fcn.004173b8
lea eax, [ebp - 0xb4]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
fld qword [ebp - 0x18]
lea eax, [ebp - 0xc8]
call fcn.00417390
lea eax, [ebp - 0xc8]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0xd8]
call fcn.0041b3cc
lea eax, [ebp - 0xd8]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x1d]
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0xe8]
cmp byte [ebp - 0x1d], 1
sete dl
call fcn.00417354
lea eax, [ebp - 0xe8]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
lea eax, [ebp - 0x4e]
xor ecx, ecx
mov edx, 0xb
call fcn.00403378
mov eax, dword [ebp - 0x21]
add eax, edi
mov edx, dword [esi + 0xc2]
lea eax, [edx + eax - 0xa]
lea edx, [ebp - 0x4e]
mov ecx, 0xa
call fcn.00402a58
mov eax, dword [ebp - 0x4a]
test eax, eax
jle 0x583d37
mov edx, dword [ebp - 0x21]
sub edx, 0xa
cmp eax, edx
jle 0x583c83
cmp byte [esi + 0x90], 0
je 0x583ca6
lea ecx, [ebp - 4]
lea edx, [ebp - 0x4e]
mov eax, esi
call fcn.00583fa4
jmp 0x583ca6
lea edx, [ebp - 4]
xchg edx, eax
call fcn.004055c4
lea eax, [ebp - 4]
call fcn.00405490
mov edx, eax
mov eax, dword [esi + 0xc2]
add eax, edi
mov ecx, dword [ebp - 0x4a]
call fcn.00402a58
cmp byte [esi + 0x90], 0
je 0x583cef
mov eax, dword [ebp - 0x29]
sub eax, 0xc
jne 0x583cef
mov eax, dword [ebp - 4]
call fcn.00405238
mov dword [ebp - 0x1c], eax
xor eax, eax
jmp 0x583ccb
dec dword [ebp - 0x1c]
mov al, 1
cmp dword [ebp - 0x1c], 0
jle 0x583cde
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0x1c]
cmp byte [edx + ecx - 1], 0
je 0x583cc6
test al, al
je 0x583cfc
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x1c]
call fcn.004055c4
jmp 0x583cfc
cmp byte [esi + 0x90], 0
je 0x583cfc
cmp dword [ebp - 0x29], 0x10
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0xf8]
mov edx, dword [ebp - 4]
call fcn.004173b8
lea eax, [ebp - 0xf8]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
lea eax, [ebp - 0x108]
call fcn.0041b3cc
lea eax, [ebp - 0x108]
push eax
push 0
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.0x5838a2.0
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x21]
call fcn.004055c4
lea eax, [ebp - 4]
call fcn.00405490
mov edx, eax
mov eax, dword [esi + 0xc2]
add eax, edi
mov ecx, dword [ebp - 0x21]
call fcn.00402a58
lea eax, [ebp - 4]
call fcn.00405490
lea edx, [ebp - 0x5f]
mov ecx, 0x11
call fcn.00402a58
lea ecx, [ebp - 0x10]
mov edx, 0x20
lea eax, [ebp - 0x5f]
call fcn.00578cd0
test al, al
je 0x583dc5
xor eax, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
cmp word [esi + 0x6a], 0
je case.0x5838a2.0
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
push 0
fld qword [ebp - 0x10]
lea eax, [ebp - 0x118]
call fcn.0041737c
lea eax, [ebp - 0x118]
push eax
push 1
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x583e69
lea eax, [ebp - 0x118]
mov edx, dword [0x401164]
mov ecx, 6
call fcn.00405de8
lea eax, [ebp - 0xb8]
call fcn.00404f68
lea eax, [ebp - 0xb4]
mov edx, dword [0x401164]
mov ecx, 3
call fcn.00405de8
lea eax, [ebp - 0x84]
call fcn.00404f68
lea eax, [ebp - 0x80]
mov edx, dword [0x401164]
mov ecx, 2
call fcn.00405de8
lea eax, [ebp - 4]
call fcn.00404f68
ret