Function at 0x100403d4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x168
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [0x10145830], 0x16c7
mov dword [0x10145834], 0x11d3
mov edx, ecx
mov dword [ebp - 0x130], eax
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x138], ecx
mov eax, dword [ebp - 0x138]
mov ecx, dword [ebp - 0x134]
lea edx, [0x10115c3c]
imul esi, eax, 0x70
mov edi, edx
add edi, esi
add edi, 0x6c
mov esi, dword [edi]
imul edi, eax, 0x70
add edx, edi
add edx, 0x30
movzx edx, word [edx]
xor edx, esi
add edx, ecx
add eax, 1
cmp eax, 0x6d2
mov ecx, edx
mov dword [ebp - 0x13c], edx
mov dword [ebp - 0x134], ecx
mov dword [ebp - 0x138], eax
jne 0x1004040d
xor eax, eax
mov dword [0x10145830], 0x19d9
mov dword [ebp - 0x140], eax
mov eax, dword [ebp - 0x140]
mov ecx, eax
add ecx, 1
mov dl, byte [eax + 0x1004467c]
mov dh, byte [eax + 0x1004464d]
sub dh, dl
mov byte [ebp + eax - 0x12c], dh
cmp ecx, 0xe
mov dword [ebp - 0x140], ecx
jne 0x10040478
lea eax, [ebp - 0x12c]
mov dword [0x10145830], 0xffffec33
mov dword [ebp - 0x144], eax
call fcn.10041821
mov dword [esp], eax
mov eax, dword [ebp - 0x144]
mov dword [esp + 4], eax
call fcn.1004146b
mov dword [0x10145850], eax
mov dword [0x10145830], 0x1fe1
mov ecx, esp
mov edx, dword [ebp - 0x13c]
mov dword [ecx + 4], edx
mov dword [ecx + 0xc], 4
mov dword [ecx + 8], 0x1000
mov dword [ecx], 0
call eax
sub esp, 0x10
xor ecx, ecx
mov edx, ecx
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x150], ecx
mov eax, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x14c]
lea edx, [0x10115c3c]
mov esi, dword [ebp - 0x148]
add esi, eax
imul edi, ecx, 0x70
mov ebx, edx
add ebx, edi
add ebx, 0x30
imul edi, ecx, 0x70
mov dword [ebp - 0x154], eax
mov eax, edx
add eax, edi
add eax, 0x6c
imul edi, ecx, 0x70
add edx, edi
add edx, 0x2c
add ecx, 1
mov eax, dword [eax]
mov edx, dword [edx]
movzx edi, word [ebx]
xor edi, eax
mov dword [esp], esi
mov dword [esp + 4], edx
mov dword [esp + 8], edi
mov dword [ebp - 0x158], ecx
mov dword [ebp - 0x15c], edi
call fcn.100418ed
mov eax, dword [ebp - 0x15c]
mov ecx, dword [ebp - 0x154]
add eax, ecx
mov edx, dword [ebp - 0x158]
cmp edx, 0x6d2
mov dword [ebp - 0x14c], edx
mov dword [ebp - 0x150], eax
jne 0x10040521
lea eax, [0x1004465b]
mov ecx, 0x20
lea edx, [ebp - 0x10c]
mov esi, dword [0x10145830]
add esi, 0xfffff431
mov dword [0x10145834], esi
mov dword [0x10145830], 0x1361
mov dword [esp], edx
mov dword [esp + 4], eax
mov dword [esp + 8], 0x20
mov dword [ebp - 0x160], edx
mov dword [ebp - 0x164], ecx
call fcn.1004078b
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
mov ecx, dword [ebp - 0x148]
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x13c]
mov dword [esp + 0xc], edx
call fcn.10041660
xor eax, eax
mov ecx, dword [ebp - 0x148]
add ecx, 0x10705a
mov edx, dword [ebp - 0x130]
mov dword [edx], ecx
mov dword [0x10145830], 0xbf8
mov dword [edx + 4], 0x13a200
mov dword [0x10145834], 0x1e98
mov ecx, dword [ebp - 0x148]
add ecx, 0xa4852
mov dword [edx + 8], ecx
mov ecx, dword [0x10145830]
add ecx, 0x245f
mov dword [0x10145830], ecx
mov dword [edx + 0xc], 0x1f50
add esp, 0x168
pop esi
pop edi
pop ebx
pop ebp
ret