Function at 0x10039b30
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x438
mov edx, dword [esp + 0x43c]
push ebx
mov ebx, dword [esp + 0x444]
push ebp
push esi
mov dword [ebx], 0
mov ecx, dword [0x107ab964]
push edi
push 0
mov eax, dword [ecx]
push 0x8002
push edx
call dword [eax + 4]
mov esi, eax
cmp esi, 0xffffffff
je 0x10039db3
mov ecx, dword [0x107ab964]
push esi
mov eax, dword [ecx]
call dword [eax + 0x20]
mov ebp, eax
test ebp, ebp
jle 0x10039da7
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x20]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], eax
push ecx
mov byte [esp + 0x20], al
mov eax, dword [0x107ab964]
push edx
push esi
push eax
call fcn.10010a00
add esp, 0x10
test eax, eax
je 0x10039da7
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
add eax, ecx
cmp eax, 0xdc00
jne 0x10039da7
lea eax, [ebp - 0xdc00]
cmp eax, 0x200
jge 0x10039c13
mov ecx, dword [0x107ab964]
push esi
mov edx, dword [ecx]
call dword [edx + 0x18]
mov eax, dword [esp + 0x44c]
mov ecx, dword [0x107ab964]
push ebx
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, 0x438
ret
mov ecx, dword [0x107ab964]
lea edx, [esp + 0x10]
push 1
lea eax, [esp + 0x4c]
push edx
mov edi, 0x400
push eax
push edi
push edi
push 0x93af
push ebp
push esi
push ecx
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x10039da7
cmp dword [esp + 0x10], edi
jne 0x10039da7
cmp dword [esp + 0x48], 0x4d88088a
jne 0x10039d58
cmp dword [esp + 0x4c], 0xf34d8af3
jne 0x10039d58
cmp word [esp + 0x50], 0xf180
jne 0x10039d58
cmp dword [esp + 0x53], 0x8af24d88
jne 0x10039d58
cmp dword [esp + 0x57], 0x4d88f24d
jne 0x10039d58
cmp dword [esp + 0x5b], 0xf14d8af1
jne 0x10039d58
cmp dword [esp + 0x5f], 0x40420a88
jne 0x10039d58
cmp dword [esp + 0x63], 0x75cfff66
jne 0x10039d58
cmp byte [esp + 0x67], 0xe0
jne 0x10039d58
mov ecx, dword [0x107ab964]
lea edx, [esp + 0x10]
push 1
lea eax, [esp + 0x4c]
mov bl, byte [esp + 0x56]
push edx
push eax
push edi
push edi
push 0xdc00
push ebp
push esi
push ecx
call fcn.100253e0
add esp, 0x24
test eax, eax
je 0x10039da7
cmp dword [esp + 0x10], edi
jne 0x10039da7
xor eax, eax
mov cl, byte [esp + eax + 0x48]
xor cl, bl
mov byte [esp + eax + 0x48], cl
inc eax
cmp eax, edi
jl 0x10039d04
je 0x10039d22
cmp word [esp + 0x48], 0x5a4d
jne 0x10039da7
mov ecx, dword [0x107ab964]
push 0
push 0xdc00
push esi
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, dword [0x107ab964]
cmp eax, 0xdc00
jne 0x10039dad
mov edx, dword [esp + 0x10]
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x4c]
push edx
push esi
call dword [eax + 0x14]
cmp eax, dword [esp + 0x10]
je 0x10039d71
mov ecx, dword [0x107ab964]
push esi
mov eax, dword [ecx]
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x438
ret
mov ecx, dword [0x107ab964]
push 0xdc00
push ebp
push esi
push ecx
call fcn.1002b090
mov ecx, dword [0x107ab964]
add esp, 0x10
test eax, eax
je 0x10039dad
mov eax, dword [ecx]
push esi
call dword [eax + 0x18]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x438
ret
mov ecx, dword [0x107ab964]
mov edx, dword [ecx]
push esi
call dword [edx + 0x18]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x438
ret