Function at 0x10057940
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x68
mov edx, dword [esp + 0x6c]
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
push edi
push 0
mov dword [ebp], 0
mov ecx, dword [0x107ab964]
push 0x8002
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [0x107ab964]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x10057987
mov eax, dword [ecx]
push 0xffffffffffffffff
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x68
ret
mov edx, dword [ecx]
push ebx
call dword [edx + 0x20]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
jl 0x10057b05
mov edx, dword [0x107ab964]
mov ecx, 0x18
xor eax, eax
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
push ecx
push ebx
push edx
call fcn.1000fc50
add esp, 0xc
test eax, eax
je 0x10057b05
lea ecx, [esp + 0x80]
lea edx, [esp + 0x18]
push ecx
push edx
push esi
push ebx
mov dword [esp + 0x90], 0
call fcn.101976e0
add esp, 0x10
test eax, eax
je 0x10057b05
mov eax, dword [esp + 0x80]
cmp eax, 0x3000
jl 0x10057b05
cmp eax, 0x7000
jg 0x10057b05
lea ecx, [eax + 0x400]
cmp esi, ecx
jg 0x10057a45
mov ecx, dword [0x107ab964]
push ebx
mov edx, dword [ecx]
call dword [edx + 0x18]
mov eax, dword [esp + 0x7c]
mov ecx, dword [0x107ab964]
push ebp
push eax
push ecx
call fcn.1002bac0
add esp, 0xc
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x68
ret
push 0
push 0
lea ebp, [eax + 8]
push 0
push 0
push ebp
call sub.platform.dll_Ordinal_24
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x10057a75
mov ecx, dword [0x107ab964]
push ebx
mov edx, dword [ecx]
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x68
ret
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 1
mov eax, ecx
push edx
push esi
sub eax, ebp
push ebp
push ebp
mov dword [esp + 0x24], eax
push eax
mov eax, dword [0x107ab964]
push ecx
push ebx
push eax
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x10057ba8
cmp dword [esp + 0x14], ebp
jne 0x10057ba8
mov edi, dword [esp + 0x80]
mov eax, 1
cmp edi, eax
jle 0x10057aee
mov dl, byte [esi + eax - 1]
mov dword [esp + 0x7c], 0
xor dl, al
mov byte [esi + eax - 1], dl
mov edi, dword [esp + 0x80]
mov cl, byte [esi + edi]
mov byte [esp + 0x7c], cl
mov edx, dword [esp + 0x7c]
and edx, 0xffff
add eax, edx
cmp eax, edi
jl 0x10057abe
push edi
push esi
call fcn.1000ba10
add esp, 8
test eax, eax
jne 0x10057b1b
push esi
call sub.platform.dll_Ordinal_27
add esp, 4
mov ecx, dword [0x107ab964]
push ebx
mov eax, dword [ecx]
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x68
ret
mov ecx, dword [esp + 0x80]
mov edi, dword [esp + 0x10]
mov edx, dword [0x107ab964]
push ecx
push ebp
push esi
push edi
push ebx
push edx
call fcn.10029d90
add esp, 0x18
test eax, eax
push esi
je 0x10057afd
call sub.platform.dll_Ordinal_27
mov ecx, dword [esp + 0x84]
mov edx, dword [0x107ab964]
push 0
push ecx
push edi
push ebx
push edx
call fcn.1002b820
add esp, 0x18
test eax, eax
je 0x10057b05
mov ecx, dword [0x107ab964]
push 1
push 0x13a3
push edi
push ebx
push ecx
call fcn.10013800
mov ecx, dword [0x107ab964]
add esp, 0x14
test eax, eax
jne 0x10057b95
mov edx, dword [ecx]
push ebx
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x68
ret
mov eax, dword [ecx]
push ebx
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x68
ret
push esi
call sub.platform.dll_Ordinal_27
mov ecx, dword [0x107ab964]
add esp, 4
mov edx, dword [ecx]
push ebx
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x68
ret