Function at 0x407ab1
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 0x407b21
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.0040f250
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 0x407af1
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
xor ebp, ebp
mov ecx, ebp
mov edx, ebp
test ebx, ebx
jle 0x407b4a
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 0x407b32
push 0x44c
call fcn.00410c71
mov edi, eax
pop ecx
test edi, edi
je 0x407b76
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 0x407b78
mov edi, ebp
push ecx
push ebx
push esi
mov ecx, edi
call fcn.0040e23f
mov dword [0x43f160], eax
test eax, eax
je 0x407b9b
test edi, edi
je 0x407b97
push ecx
mov ecx, edi
call fcn.0040e934
mov esi, ebp
jmp 0x407bae
push 8
call fcn.00410c71
mov esi, eax
pop ecx
mov dword [esi], 1
mov dword [esi + 4], edi
push 5
mov edx, 0x4311c8
lea ecx, [esp + 0x3c]
call fcn.0040651e
cmp dword [eax + 0x14], 8
jb 0x407bc6
mov eax, dword [eax]
mov edx, 0x80000
mov ecx, 0x10000
test esi, esi
jne 0x407bde
mov dword [0x43f160], ecx
mov edi, ecx
jmp 0x407c09
cmp dword [esi], 1
je 0x407bed
mov dword [0x43f160], edx
mov edi, edx
jmp 0x407c09
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x1c]
push ecx
push ecx
mov ecx, dword [esi + 4]
push eax
call fcn.0040e7ab
mov edi, eax
mov dword [0x43f160], edi
push ebp
push 1
lea ecx, [esp + 0x40]
call fcn.004023dd
test edi, edi
je 0x407cd9
cmp byte [0x489ef9], 0
je 0x407cb1
push 4
mov edx, 0x43211c
lea ecx, [esp + 0x24]
call fcn.0040651e
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.0040701a
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, 0x430734
lea ecx, [esp + 0x24]
call fcn.0040651e
cmp dword [eax + 0x14], 8
jb 0x407c91
mov eax, dword [eax]
push 0x40040
push eax
lea eax, [esp + 0x288]
push eax
push ecx
call fcn.0040403f
push ebp
push 1
lea ecx, [esp + 0x28]
call fcn.004023dd
push 0x2f
mov edx, 0x431890
lea ecx, [esp + 0x24]
call fcn.0040651e
mov ecx, eax
call fcn.0040905e
push ebp
push 1
lea ecx, [esp + 0x28]
call fcn.004023dd
jmp 0x407d76
mov ebx, dword [esp + 0x27c]
push ebx
call fcn.0040f054
mov ebp, eax
pop ecx
test esi, esi
jne 0x407cf9
mov dword [0x43f160], 0x10000
jmp 0x407d1e
cmp dword [esi], 1
je 0x407d0a
mov dword [0x43f160], 0x80000
jmp 0x407d1e
push ecx
mov ecx, dword [esi + 4]
push ebx
push ebp
push dword [esp + 0x24]
call fcn.0040e853
mov dword [0x43f160], eax
push ebx
push ebp
push dword [esp + 0x1c]
call fcn.0040f250
add esp, 0xc
test esi, esi
jne 0x407d3c
mov dword [0x43f160], 0x10000
jmp 0x407d6f
cmp dword [esi], 1
je 0x407d4d
mov dword [0x43f160], 0x80000
jmp 0x407d6f
mov edi, dword [esi + 4]
mov ecx, edi
call fcn.0040e8f6
mov dword [0x43f160], eax
test edi, edi
je 0x407d68
push ecx
mov ecx, edi
call fcn.0040e934
push esi
call fcn.00410a63
pop ecx
push ebp
call fcn.00410920
pop ecx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x510
ret 0x14