Function at 0x404690
Capabilities:
Encode data using xor

Disassembly:
cmp byte [esi + 6], 0
jne 0x4046fc
cmp byte [esi + 7], 0
jne 0x4046fc
mov edi, dword [ebp + 0x78]
add edi, eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x24]
push eax
push edi
push ebx
call fcn.00404de5
add esp, 0x10
test eax, eax
jg 0x4046fc
mov esi, dword [ebx + 0x18]
lea eax, [esp + 0x34]
push 8
push eax
call fcn.00405a55
add esp, 8
mov dword [esp + 0x34], 0xfe1d8460
lea eax, [esp + 0x34]
mov dword [esp + 0x38], 0xffffffff
push eax
push 0
call esi
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x24]
push eax
push edi
push ebx
call fcn.00404de5
add esp, 0x10
test eax, eax
jle 0x4046b9
mov esi, dword [esp + 0x30]
push ebp
push dword [ebp + 0x128]
mov dword [esp + 0x90], ebx
push esi
call fcn.00404205
push ebp
push dword [ebp + 0xc0]
mov dword [esp + 0xa0], eax
push esi
call fcn.00404205
mov edi, dword [esp + 0x28]
push ebp
push dword [ebp + 0xa8]
mov dword [esp + 0xb0], eax
push edi
call fcn.00404205
mov dword [esp + 0xb8], eax
add esp, 0x24
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x14], 0
push dword [eax + 0xb8]
push dword [eax + 0xa4]
mov eax, dword [ebx + 0x48]
call eax
mov ecx, dword [ebx + 0x50]
mov esi, eax
push 0x104
push esi
push 0
call ecx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
lea eax, [esp + 0x18]
push eax
push ebx
push esi
call fcn.004056b5
push ebp
push dword [ebp + 0x70]
push edi
call fcn.00404205
mov edx, dword [ebp + 0x88]
add esp, 0x1c
add edx, dword [esp + 0x14]
mov dword [esp + 0x44], eax
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0xac]
mov edi, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x74]
xor eax, dword [ebp]
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x30], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x28], 0
cmp edi, eax
jne 0x404806
push ebp
push ebx
lea eax, [esp + 0x30]
push eax
push ecx
push dword [esp + 0x2c]
lea eax, [edx + 8]
push eax
call fcn.00405755
add esp, 0x18
jmp 0x4049e5
mov eax, edi
test edi, edi
jne 0x404815
mov eax, dword [ebx + 0x40]
mov eax, dword [eax + 0xb8]
push eax
mov eax, dword [ebx + 0x40]
push dword [eax + 0xa4]
mov eax, dword [ebx + 0x48]
call eax
mov ecx, dword [esp + 0x20]
mov esi, eax
push edi
add ecx, 8
push ecx
push esi
call fcn.004041b5
add esp, 0xc
xor eax, eax
test edi, edi
je 0x40484f
mov ecx, dword [esp + 0x18]
nop dword [eax]
xor dword [eax + esi], ecx
add eax, 4
cmp eax, edi
jb 0x404845
mov eax, dword [ebx + 0x40]
push dword [eax + 0xb8]
push dword [eax + 0xa4]
mov eax, dword [ebx + 0x48]
call eax
mov cl, byte [esi]
mov edi, eax
mov dword [esp + 0x14], edi
test cl, cl
je 0x404889
mov edx, edi
nop dword [eax]
movsx ax, cl
lea esi, [esi + 1]
lea edx, [edx + 2]
mov word [edx - 2], ax
mov cl, byte [esi]
test cl, cl
jne 0x404875
push ebx
call fcn.004050b5
push edi
call fcn.00405685
xor esi, esi
mov dword [esp + 0x28], eax
add esp, 8
mov dword [esp + 0x1c], esi
xor edx, edx
test eax, eax
je 0x4048c1
mov ebx, eax
imul esi, dword [ebp + 0x58]
movzx ecx, word [edi + edx*2]
inc edx
add esi, ecx
cmp edx, ebx
jb 0x4048aa
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x1c], esi
push ebp
push esi
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x98]
push eax
push ebx
call fcn.00405285
add esp, 0x18
test al, al
jne 0x4049c4
mov eax, dword [ebx + 0x40]
push dword [eax + 0xb8]
push dword [eax + 0xa4]
mov eax, dword [ebx + 0x48]
call eax
mov ebp, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], ebp
jmp 0x404915
mov edi, dword [esp + 0x14]
nop dword [eax]
push ebx
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x54]
push eax
push edi
call fcn.00405525
add esp, 0x10
test al, al
jne 0x404962
mov esi, dword [ebx + 0x18]
lea eax, [esp + 0x54]
push 8
push eax
mov dword [esp + 0x34], 0
call fcn.00405a55
add esp, 8
mov dword [esp + 0x54], 0xfd5440f0
lea eax, [esp + 0x54]
mov dword [esp + 0x58], 0xffffffff
push eax
push 0
call esi
jmp 0x404915
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x14]
push eax
push ebp
push ebx
call fcn.00404de5
mov esi, eax
add esp, 0x10
cmp esi, 4
jb 0x404915
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x40]
cmp dword [edi], eax
jne 0x40490a
xor ecx, ecx
test esi, esi
je 0x40490a
mov eax, dword [esp + 0x34]
cmp dword [ecx + edi], eax
je 0x4049a6
inc ecx
cmp ecx, esi
jb 0x404997
jmp 0x40490a
mov ebp, dword [esp + 0x24]
lea eax, [esp + 0x88]
push ebp
push dword [esp + 0x20]
push esi
push edi
push eax
push ebx
call fcn.00405925
add esp, 0x18
jmp 0x4049cc
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
push ebp
push ebx
lea eax, [esp + 0x30]
push eax
push esi
push edi
call fcn.00404c15
add esp, 0x14
test al, al
je 0x404bb4
mov eax, dword [esp + 0x28]
mov esi, dword [eax + 0xc]
lea ecx, [eax + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 0x24], eax
mov eax, esi
mov dword [esp + 0x34], ecx
test esi, esi
jne 0x404a09
mov eax, dword [ebx + 0x40]
mov eax, dword [eax + 0xb8]
push eax
mov eax, dword [ebx + 0x40]
push dword [eax + 0xa4]
mov eax, dword [ebx + 0x48]
call eax
mov ecx, dword [ebx + 0x38]
mov edi, eax
lea eax, [esp + 0x50]
mov dword [esp + 0x40], edi
push eax
push dword [esp + 0x28]
mov dword [esp + 0x58], 0
push dword [esp + 0x3c]
push esi
push edi
push 2
call ecx
test eax, eax
jne 0x404bb4
lea eax, [edi + 0x90]
xor esi, esi
push eax
call fcn.00405655
add esp, 4
test eax, eax
jne 0x404a5f
mov esi, dword [edi + 0x160]
mov eax, dword [edi + 8]
lea ecx, [esp + 0x18]
push ebp
push dword [ebp + 0x50]
add eax, edi
mov dword [esp + 0x20], 0
add esi, 0x3dd
add eax, esi
push ecx
push eax
push ebx
mov dword [esp + 0x48], eax
inc esp
and al, 0x48