Function at 0x40f740
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x68
mov eax, dword [0x43c510]
xor eax, esp
mov dword [esp + 0x64], eax
push ebx
mov ebx, dword [esp + 0x70]
push esi
mov esi, dword [esp + 0x78]
xor eax, eax
cmp esi, eax
push edi
mov edi, edx
lea edx, [ecx + 0x5c]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], edx
jne 0x40f78a
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x64]
xor ecx, esp
call fcn.0042fc34
add esp, 0x68
ret
cmp dword [ecx + 0xc4], eax
jle 0x40f7a4
lea eax, [ecx + 0xc0]
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], eax
lea edx, [esi + 0x13]
mov eax, 0xcccccccd
mul edx
mov eax, dword [ecx + 0xd0]
push ebp
mov ebp, edx
shr ebp, 4
test eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], esi
jbe 0x40f80e
mov esi, dword [ecx + 0xcc]
mov dword [esp + 0x14], eax
lea ecx, [edi + 2]
mov eax, esi
sub edi, esi
mov edx, 4
lea esp, [esp]
movzx ebx, byte [edi + eax]
xor byte [eax], bl
movzx ebx, byte [ecx - 1]
xor byte [eax + 1], bl
movzx ebx, byte [ecx]
xor byte [eax + 2], bl
movzx ebx, byte [ecx + 1]
xor byte [eax + 3], bl
movzx ebx, byte [ecx + 2]
xor byte [eax + 4], bl
add eax, 5
add ecx, 5
sub edx, 1
jne 0x40f7e0
jmp 0x40f818
mov dword [esp + 0x14], 0x14
mov esi, edi
mov ebx, dword [esp + 0x14]
add ebx, 0xffffffeb
test ebp, ebp
jle 0x40f8e9
mov dword [esp + 0x28], ebp
jmp 0x40f830
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x60]
push eax
push ecx
push esi
push 0
push edx
call fcn.00415fb0
mov edi, dword [esp + 0x2c]
add esp, 0x14
cmp edi, 0x14
jb 0x40f85e
mov ebp, 0x14
mov dword [esp + 0x2c], ebp
jmp 0x40f868
test edi, edi
mov ebp, edi
mov dword [esp + 0x2c], ebp
jle 0x40f87b
mov ecx, dword [esp + 0x1c]
push ebp
lea eax, [esp + 0x64]
push eax
push ecx
call sub.MSVCR80.dll_memcpy
add esp, 0xc
mov ecx, dword [esp + 0x14]
add ecx, 0xffffffff
cmp ecx, ebx
mov edx, 1
jle 0x40f8b6
lea edi, [esp + 0x74]
nop
movzx ebp, byte [ecx + esi]
movzx eax, byte [edi - 1]
sub edi, 1
add ebp, edx
add eax, ebp
mov byte [ecx + esi], al
shr eax, 8
sub ecx, 1
cmp ecx, ebx
mov edx, eax
jg 0x40f890
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x18]
test ebx, ebx
mov ecx, ebx
jl 0x40f8d3
lea esp, [esp]
movzx eax, byte [ecx + esi]
add eax, edx
mov byte [ecx + esi], al
shr eax, 8
sub ecx, 1
mov edx, eax
jns 0x40f8c0
add dword [esp + 0x1c], 0x14
sub edi, ebp
sub dword [esp + 0x28], 1
mov dword [esp + 0x18], edi
jne 0x40f830
cmp dword [esp + 0x24], 1
pop ebp
jne 0x40f9da
lea edx, [esp + 0x4c]
push edx
call fcn.00412a00
lea eax, [esp + 0x38]
push eax
call fcn.00412a00
lea ecx, [esp + 0x48]
push ecx
call fcn.00412a00
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x38]
lea edx, [esp + 0x58]
push edx
push esi
push edi
call fcn.00412720
add esp, 0x18
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40f9b9
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
push ecx
call fcn.004132a0
add esp, 8
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40f9b9
lea edx, [esp + 0x40]
push edx
push 1
call fcn.00413620
add esp, 8
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40f9b9
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.00414580
add esp, 0xc
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40f9b9
lea eax, [esp + 0x34]
push eax
push 1
call fcn.00413440
add esp, 8
test eax, eax
mov dword [esp + 0xc], eax
jne 0x40f9b9
push edi
lea ecx, [esp + 0x5c]
push ecx
push esi
lea edx, [esp + 0x40]
push esi
push edx
call fcn.00412960
add esp, 0x14
mov dword [esp + 0xc], eax
lea eax, [esp + 0x4c]
push eax
call fcn.00412a10
lea ecx, [esp + 0x38]
push ecx
call fcn.00412a10
lea edx, [esp + 0x48]
push edx
call fcn.00412a10
add esp, 0xc
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042fc34
add esp, 0x68
ret