Function at 0x38598c50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x1c
cmp dword [ecx], 0x4550
push ebx
push esi
push edi
jne 0x3859904c
cmp dword [ecx + 0xdc14], 0x800
jb 0x3859904c
mov eax, 0x2000
test word [ecx + 0x16], ax
jne 0x3859904c
mov eax, dword [ecx + 0x94cd]
add eax, dword [ecx + 0x94c9]
sub eax, dword [ecx + 0x28]
cmp eax, 0x5a
jb 0x3859904c
xor edx, edx
xor esi, esi
mov dword [ebp - 0x10], edx
xor ebx, ebx
jmp 0x38598cb0
lea edi, [ecx + 0x400]
add edi, esi
movzx eax, byte [edi]
movzx ecx, word [eax*2 + 0x7428fa8]
movzx eax, byte [edi + 1]
movzx eax, byte [ecx + eax + 0x74291a8]
test eax, eax
jne 0x38598cdf
push edi
call 0x37e8c7b0
mov edx, dword [ebp - 0x10]
add esp, 4
cmp eax, 0xffffffff
je 0x3859904c
inc edx
mov dword [ebp - 0x10], edx
cmp edx, 5
jg 0x3859904c
cmp byte [edi], 0xe8
je 0x38598d04
mov ecx, dword [ebp + 8]
add esi, eax
cmp esi, 0x4b
jl 0x38598cb0
mov edi, dword [ebp + 8]
cmp byte [esi + edi + 0x400], 0xe8
jne 0x3859904c
mov ecx, dword [esi + edi + 0x401]
add ecx, dword [edi + 0x28]
mov edx, dword [edi + 0x9545]
add ecx, eax
add ecx, esi
cmp ecx, edx
jl 0x3859904c
mov eax, dword [edi + 0x9541]
add eax, edx
cmp ecx, eax
jg 0x3859904c
push ecx
push edi
call 0x37ea5270
mov edx, dword [edi + 0x954d]
add esp, 8
mov dword [ebp - 0x1c], eax
cmp eax, edx
jb 0x3859904c
mov ecx, dword [edi + 0x9549]
add ecx, edx
cmp eax, ecx
ja 0x3859904c
mov esi, dword [edi + 0xdc14]
cmp eax, esi
jae 0x3859904c
sub esi, eax
cmp esi, 0x800
jbe 0x38598d89
mov esi, 0x800
push esi
lea eax, [edi + 0x1400]
push eax
push dword [ebp - 0x1c]
push edi
call 0x37e6d7f0
add esp, 0x10
cmp eax, esi
jne 0x3859904c
xor eax, eax
mov dword [ebp - 0x14], ebx
xor ecx, ecx
mov dword [ebp - 0xc], eax
xor dh, dh
mov byte [ebp - 3], al
mov byte [ebp - 1], dh
mov byte [ebp - 2], 1
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
lea esi, [edi + 0x1400]
add esi, eax
movzx eax, byte [esi]
movzx ecx, word [eax*2 + 0x7428fa8]
movzx eax, byte [esi + 1]
movzx eax, byte [ecx + eax + 0x74291a8]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x38598df6
push esi
call 0x37e8c7b0
mov dh, byte [ebp - 1]
add esp, 4
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x3859904c
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp eax, 0xc8
jg 0x3859904c
mov dl, byte [esi]
mov al, dl
and al, 0xf8
cmp al, 0xb8
jne 0x38598e9a
mov ecx, dword [ebp - 8]
mov eax, dword [edi + 0x34]
mov ecx, dword [ecx + edi + 0x1401]
cmp ecx, eax
jbe 0x38598e72
sub ecx, eax
cmp ecx, dword [edi + 0x50]
jae 0x38598e72
mov edx, dword [edi + 0x9545]
cmp ecx, edx
jbe 0x38598e72
mov eax, ecx
sub eax, edx
cmp eax, dword [edi + 0x9541]
jae 0x38598e72
push ecx
push edi
call 0x37ea5270
mov dl, byte [esi]
add esp, 8
and dl, 7
mov dword [ebp - 0xc], eax
mov byte [ebp - 3], dl
test eax, eax
je 0x38598e72
mov ecx, dword [edi + 0xdc14]
sub ecx, 0x800
cmp eax, ecx
jbe 0x38598e75
or ebx, 1
mov eax, dword [ebp - 8]
test bl, 1
jne 0x3859904c
add eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
cmp eax, 0x7f1
jge 0x3859904c
mov dh, byte [ebp - 1]
jmp 0x38598dc1
movzx eax, word [esi]
mov esi, 0x840f
mov ecx, eax
shr ecx, 8
cmp ax, si
jne 0x38598ec4
cmp dword [ebp - 0xc], 0
mov eax, dword [ebp - 8]
je 0x38598e78
cmp dword [eax + edi + 0x1401], 0
jle 0x38598e78
or ebx, 2
jmp 0x38598e78
cmp dl, 0x8a
jne 0x38598eef
cmp cl, 0x40
jae 0x38598e75
mov al, cl
and al, 7
cmp al, byte [ebp - 3]
jne 0x38598e75
mov eax, dword [ebp - 8]
test bl, 2
je 0x38598e78
mov dl, cl
or ebx, 4
shr dl, 3
and dl, 7
mov byte [ebp - 2], dl
jmp 0x38598e78
cmp dl, 0x80
jne 0x38598f36
mov al, cl
and al, 0x38
cmp al, 0x30
jne 0x38598e75
mov al, cl
and al, 0xc0
cmp al, 0xc0
jne 0x38598e75
and cl, 7
cmp byte [ebp - 2], cl
jne 0x38598e75
mov eax, dword [ebp - 8]
test bl, 4
je 0x38598e78
or ebx, 8
xor dh, byte [eax + edi + 0x1402]
mov byte [ebp - 1], dh
jmp 0x38598e78
cmp dl, 0x34
jne 0x38598f5e
cmp byte [ebp - 2], 0
jne 0x38598e75
mov eax, dword [ebp - 8]
test bl, 4
je 0x38598e78
or ebx, 8
xor dh, cl
mov byte [ebp - 1], dh
jmp 0x38598e78
cmp dl, 0x88
jne 0x38598f9c
cmp cl, 0x40
jae 0x38598e75
mov al, cl
shr al, 3
and al, 7
cmp byte [ebp - 2], al
jne 0x38598e75
and cl, 7
cmp cl, byte [ebp - 3]
jne 0x38598e75
mov eax, dword [ebp - 8]
test bl, 8
je 0x38598e78
or ebx, 0x10
jmp 0x38598e78
cmp dl, 0xe9
jne 0x38598e75
mov eax, dword [ebp - 8]
test bl, 0x10
je 0x3859900b
cmp dword [eax + edi + 0x1401], 0
jge 0x3859900b
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, 0xf
jg 0x3859904c
push 0x800
lea ebx, [edi + 0x1400]
push ebx
push dword [ebp - 0xc]
push edi
call 0x37e6d7f0
add esp, 0x10
cmp eax, 0x800
jne 0x3859904c
mov dh, byte [ebp - 1]
mov eax, ebx
mov ecx, 0x800
xor byte [eax], dh
lea eax, [eax + 1]
sub ecx, 1
jne 0x38598ff0
cmp byte [ebx], 0xe9
je 0x38599013
xor eax, eax
mov dword [ebp - 0xc], ecx
xor ebx, ebx
jmp 0x38598dbb
or ebx, 1
jmp 0x38598e78
mov ecx, dword [edi + 0x1401]
lea eax, [ecx - 0x30]
cmp eax, 0x795
ja 0x3859904c
mov eax, dword [ebp + 8]
lea esi, [edi + 0x1410]
add esi, ecx
mov edi, ebx
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 0x1c]
pop edi
pop esi
mov dword [eax + 0x1430], ecx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret