Function at 0x407313
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x510
push ebx
push ebp
mov ebp, dword [esp + 0x524]
xor eax, eax
mov dword [esp + 0x14], eax
mov ebx, ecx
mov dword [esp + 0x10], ebx
push esi
mov esi, edx
mov dword [esp + 0x10], esi
push edi
test ebp, ebp
jle 0x407383
mov ecx, dword [esp + 0x528]
mov ebx, edx
mov edi, dword [esp + 0x524]
sub ecx, edi
mov dword [esp + 0x528], ecx
mov esi, dword [ecx + edi]
add eax, ebx
push esi
push dword [edi]
push eax
call fcn.0040e960
mov eax, dword [esp + 0x28]
lea edi, [edi + 4]
mov ecx, dword [esp + 0x534]
add eax, esi
add esp, 0xc
mov dword [esp + 0x1c], eax
dec ebp
jne 0x407353
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
xor ebp, ebp
mov ecx, ebp
mov edx, ebp
test ebx, ebx
jle 0x4073ac
mov edi, dword [esp + 0x530]
mov al, byte [ecx + edi]
xor byte [edx + esi], al
inc ecx
xor eax, eax
cmp ecx, dword [esp + 0x534]
cmove ecx, eax
inc edx
cmp edx, ebx
jl 0x407394
push 0x44c
call fcn.00410381
mov edi, eax
pop ecx
test edi, edi
je 0x4073d8
or dword [edi + 4], 0xffffffff
or dword [edi + 0x238], 0xffffffff
mov dword [edi], ebp
mov dword [edi + 0x23c], ebp
mov dword [edi + 0x240], ebp
jmp 0x4073da
mov edi, ebp
push ecx
push ebx
push esi
mov ecx, edi
call fcn.0040d995
mov dword [0x49d46c], eax
test eax, eax
je 0x4073fd
test edi, edi
je 0x4073f9
push ecx
mov ecx, edi
call fcn.0040e03b
mov esi, ebp
jmp 0x407410
push 8
call fcn.00410381
mov esi, eax
pop ecx
mov dword [esi], 1
mov dword [esi + 4], edi
push 5
mov edx, 0x431f44
lea ecx, [esp + 0x3c]
call fcn.00405dbb
cmp dword [eax + 0x14], 8
jb 0x407428
mov eax, dword [eax]
mov edx, 0x80000
mov ecx, 0x10000
test esi, esi
jne 0x407440
mov dword [0x49d46c], ecx
mov edi, ecx
jmp 0x40746b
cmp dword [esi], 1
je 0x40744f
mov dword [0x49d46c], edx
mov edi, edx
jmp 0x40746b
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push ecx
mov ecx, dword [esi + 4]
push eax
call fcn.0040deb2
mov edi, eax
mov dword [0x49d46c], edi
push ebp
push 1
lea ecx, [esp + 0x40]
call fcn.004023dd
test edi, edi
je 0x40753c
cmp byte [0x496261], 0
je 0x407514
push 4
mov edx, 0x43d51c
lea ecx, [esp + 0x24]
call fcn.00405dbb
push edi
sub esp, 0x18
mov esi, eax
lea eax, [esp + 0x29c]
push 6
pop ecx
mov edi, esp
push 0x3ff
push eax
lea eax, [esp + 0x5c]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.0040687c
add esp, 0x28
lea ecx, [esp + 0x38]
push ebp
push 1
call fcn.004023dd
push ebp
push 1
lea ecx, [esp + 0x28]
call fcn.004023dd
push 3
mov edx, 0x431890
lea ecx, [esp + 0x24]
call fcn.00405dbb
cmp dword [eax + 0x14], 8
jb 0x4074f3
mov eax, dword [eax]
push 0x40040
push eax
lea eax, [esp + 0x288]
push eax
push ebp
call dword [0x495eb0]
push ebp
push 1
lea ecx, [esp + 0x28]
call fcn.004023dd
push 0x2f
mov edx, 0x4388e0
lea ecx, [esp + 0x24]
call fcn.00405dbb
mov ecx, eax
call fcn.004088bf
push ebp
push 1
lea ecx, [esp + 0x28]
call fcn.004023dd
jmp 0x4075d9
mov ebx, dword [esp + 0x27c]
push ebx
call fcn.0040e75b
mov ebp, eax
pop ecx
test esi, esi
jne 0x40755c
mov dword [0x49d46c], 0x10000
jmp 0x407581
cmp dword [esi], 1
je 0x40756d
mov dword [0x49d46c], 0x80000
jmp 0x407581
push ecx
mov ecx, dword [esi + 4]
push ebx
push ebp
push dword [esp + 0x24]
call fcn.0040df5a
mov dword [0x49d46c], eax
push ebx
push ebp
push dword [esp + 0x1c]
call fcn.0040e960
add esp, 0xc
test esi, esi
jne 0x40759f
mov dword [0x49d46c], 0x10000
jmp 0x4075d2
cmp dword [esi], 1
je 0x4075b0
mov dword [0x49d46c], 0x80000
jmp 0x4075d2
mov edi, dword [esi + 4]
mov ecx, edi
call fcn.0040dffd
mov dword [0x49d46c], eax
test edi, edi
je 0x4075cb
push ecx
mov ecx, edi
call fcn.0040e03b
push esi
call fcn.00410173
pop ecx
push ebp
call fcn.00410030
pop ecx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x510
ret 0x14