Function at 0x4036f0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x499f67
push eax
mov dword fs:[0], esp
sub esp, 0xdc
lea eax, [esp + 0x1c]
push ebx
push ebp
mov ebp, ecx
push esi
push edi
push 1
lea esi, [ebp + 0x118]
push eax
mov ecx, esi
call fcn.0048a360
mov eax, dword [eax]
push 0x4c2288
push eax
call fcn.0047514f
add esp, 8
lea ecx, [esp + 0x2c]
test eax, eax
setne bl
call fcn.0048c403
test bl, bl
je 0x403753
push 0x4c2288
mov ecx, esi
call fcn.0048c7df
mov ecx, dword [0x4cc854]
mov dword [esp + 0x10], ecx
push 0x4c2398
lea ecx, [esp + 0x14]
mov dword [esp + 0xf8], 0
call fcn.0048c58c
lea edx, [esp + 0x10]
lea eax, [esp + 0x30]
push edx
push esi
push eax
call fcn.0048c632
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0xf8], 1
call fcn.0048c53c
lea ecx, [esp + 0x30]
mov byte [esp + 0xf4], 0
call fcn.0048c403
push ecx
lea edx, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x30], esp
push edx
call fcn.0048c178
call fcn.004018d0
add esp, 4
test eax, eax
jne 0x4037db
push 0x4c2784
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
jmp 0x403a06
mov eax, dword [0x4cc854]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov ecx, 0x2e
xor eax, eax
lea edi, [esp + 0x34]
mov ebx, 3
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xf4], bl
call fcn.00490080
mov eax, dword [esp + 0x10]
push 0
push 0x2000
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x100], 4
call fcn.00490192
test eax, eax
jne 0x403840
push 0x4c27d8
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
jmp 0x4039d4
mov eax, dword [esp + 0x128]
mov edx, dword [esp + 0x124]
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea esi, [edx + ecx*8 + 0xe]
lea ecx, [esp + 0x1c]
call fcn.0049048c
cmp eax, esi
jbe 0x4039bb
push 0
push esi
lea ecx, [esp + 0x24]
call fcn.00490334
lea eax, [esp + 0x34]
push 0xb8
push eax
lea ecx, [esp + 0x24]
call fcn.004902af
mov ecx, dword [esp + 0x38]
inc ecx
push ecx
call fcn.0048c144
mov edx, dword [esp + 0x3c]
mov esi, eax
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
add esp, 4
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, ebx
rep stosb byte es:[edi], al
lea ecx, [esp + 0x1c]
call fcn.0049048c
mov ecx, dword [esp + 0x34]
cmp eax, ecx
jbe 0x4039b4
test ecx, ecx
jl 0x4039b4
push 0
push ecx
lea ecx, [esp + 0x24]
call fcn.00490334
lea ecx, [esp + 0x1c]
call fcn.0049048c
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
lea edi, [edx + ecx]
cmp eax, edi
jb 0x4039b4
test edx, edx
jle 0x4039b4
push ecx
push esi
lea ecx, [esp + 0x24]
call fcn.004902af
cmp byte [ebp + 0x114], 1
jne 0x403931
mov ecx, dword [esp + 0x38]
xor eax, eax
test ecx, ecx
jle 0x403931
mov cl, byte [ebp + 4]
mov dl, byte [eax + esi]
xor dl, cl
mov byte [eax + esi], dl
mov ecx, dword [esp + 0x38]
inc eax
cmp eax, ecx
jl 0x40391d
lea edi, [ebp + 8]
push esi
mov ecx, edi
call fcn.0040a190
mov edx, dword [esp + 0x12c]
mov ecx, edi
push edx
call fcn.0040a160
mov ecx, dword [esp + 0x130]
push eax
call fcn.0048c58c
push esi
call fcn.0048c16d
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004903ad
lea ecx, [esp + 0x1c]
mov byte [esp + 0xf4], bl
call fcn.004900d5
lea ecx, [esp + 0x14]
mov byte [esp + 0xf4], 2
call fcn.0048c403
lea ecx, [esp + 0x18]
mov byte [esp + 0xf4], 0
call fcn.0048c403
lea ecx, [esp + 0x10]
mov dword [esp + 0xf4], 0xffffffff
call fcn.0048c403
mov al, 1
jmp 0x403a1c
push 0x4c27ac
jmp 0x4039c0
push 0x4c2758
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
lea ecx, [esp + 0x1c]
call fcn.004903ad
lea ecx, [esp + 0x1c]
mov byte [esp + 0xf4], bl
call fcn.004900d5
lea ecx, [esp + 0x14]
mov byte [esp + 0xf4], 2
call fcn.0048c403
lea ecx, [esp + 0x18]
mov byte [esp + 0xf4], 0
call fcn.0048c403
lea ecx, [esp + 0x10]
mov dword [esp + 0xf4], 0xffffffff
call fcn.0048c403
xor al, al
mov ecx, dword [esp + 0xec]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0xe8
ret 0x38