Function at 0x510950
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x644
mov eax, dword [0x59f740]
xor eax, esp
mov dword [esp + 0x640], eax
push ebp
mov ebp, dword [esp + 0x64c]
push edi
push 0x10
push 0x42
mov dword [esp + 0x18], ebp
call dword [0x5710e4]
push eax
call dword [0x5710e0]
mov edi, eax
test edi, edi
jne 0x5109b0
push str.OpenFastFile_:
push 2
call fcn.005139a0
add esp, 8
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.00517235
add esp, 0x644
ret
push ebx
push esi
mov esi, dword [0x57115c]
push 0
push 0x8000080
push 3
push 0
push 1
push 0x80000000
push ebp
mov dword [edi], 0
call esi
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x510fb8
push 0x7716b8
call dword [0x5710f8]
test eax, eax
je 0x510aab
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x38]
push eax
push ebp
call fcn.00518551
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x510a5a
cmp al, 0x2f
je 0x510a5a
mov ebx, dword [0x5710d0]
push 0x770500
lea ecx, [esp + 0x148]
push ecx
call ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x148]
push eax
call dword [0x571100]
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x48]
push edx
call ebx
jmp 0x510a60
mov ebx, dword [0x5710d0]
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x150]
push 0x7716b8
push eax
call fcn.0051833f
add esp, 0x14
push 0
push 0x8000080
push 3
push 0
push 1
push 0x80000000
lea ecx, [esp + 0x15c]
push ecx
call esi
mov dword [edi + 4], eax
jmp 0x510ab1
mov ebx, dword [0x5710d0]
cmp dword [edi + 4], 0xffffffff
jne 0x510fb8
push ebp
xor esi, esi
call dword [0x5710f8]
dec eax
mov dword [esp + 0x20], eax
lea esp, [esp]
inc esi
cmp esi, eax
mov dword [esp + 0x24], esi
jge 0x510c32
lea ecx, [ecx]
mov al, byte [esi + ebp]
cmp al, 0x5c
je 0x510aef
cmp al, 0x2f
jne 0x510c11
lea edx, [esi + ebp + 1]
push edx
lea eax, [esp + 0x550]
push eax
call ebx
push ebp
lea ecx, [esp + 0x34c]
push ecx
call ebx
push str..bin
lea edx, [esp + esi + 0x34c]
push edx
call ebx
push 0
push 0x8000080
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x360]
push eax
call dword [0x57115c]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x510c0b
push 0x7716b8
call dword [0x5710f8]
test eax, eax
je 0x510c0b
lea ecx, [esp + 0x248]
push ecx
lea edx, [esp + 0x450]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x358]
push edx
call fcn.00518551
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x510bbe
cmp al, 0x2f
je 0x510bbe
push 0x770500
lea eax, [esp + 0x148]
push eax
call ebx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x148]
push edx
call dword [0x571100]
lea eax, [esp + 0x144]
push eax
lea ecx, [esp + 0x48]
push ecx
call ebx
lea edx, [esp + 0x248]
push edx
lea eax, [esp + 0x450]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x150]
push 0x7716b8
push edx
call fcn.0051833f
add esp, 0x14
push 0
push 0x8000080
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x15c]
push eax
call dword [0x57115c]
mov dword [edi + 4], eax
cmp dword [edi + 4], 0xffffffff
jne 0x510c47
movsx ecx, byte [esi + ebp]
push ecx
call fcn.0051b64d
add esp, 4
test eax, eax
je 0x510c23
inc esi
inc esi
cmp esi, dword [esp + 0x20]
mov dword [esp + 0x24], esi
jl 0x510ae0
push ebp
push 0x573a38
push 2
call fcn.005139a0
add esp, 0xc
jmp 0x510fed
cmp esi, dword [esp + 0x20]
jge 0x510c32
mov ecx, dword [edi + 4]
push 0
lea edx, [esp + 0x2c]
push edx
push 0x14
lea eax, [esp + 0x3c]
push eax
push ecx
call dword [0x571190]
test eax, eax
je 0x510fd3
mov eax, 8
xor ecx, ecx
jmp 0x510c80
mov edx, dword [esp + ecx + 0x30]
cmp edx, dword [ecx + str.ESC_ARC2]
jne 0x510fd3
sub eax, 4
add ecx, 4
cmp eax, 4
jae 0x510c80
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
xor ecx, 0x65ac9365
lea edx, [ecx + ecx]
xor edx, ecx
mov eax, ecx
shr eax, 1
xor eax, ecx
add edx, edx
shr eax, 3
add edx, edx
add edx, edx
xor eax, edx
xor eax, ecx
xor ebp, eax
xor eax, 0x65ac9365
lea ecx, [eax + eax]
xor ecx, eax
mov esi, eax
shr esi, 1
xor esi, eax
add ecx, ecx
mov dword [esp + 0x14], ebp
add ecx, ecx
shr esi, 3
add ecx, ecx
lea ebp, [ebp + ebp*2]
xor esi, ecx
xor esi, eax
mov eax, dword [esp + 0x40]
add ebp, ebp
add ebp, ebp
push ebp
xor eax, esi
push 0
mov dword [esp + 0x18], eax
call dword [0x5710e4]
push eax
call dword [0x5710e0]
mov ebx, eax
test ebx, ebx
je 0x510eea
mov eax, dword [edi + 4]
push 0
lea edx, [esp + 0x2c]
push edx
push ebp
push ebx
push eax
call dword [0x571190]
test eax, eax
je 0x510f02
mov ecx, dword [esp + 0x10]
push ecx
push 0
call dword [0x5710e4]
push eax
call dword [0x5710e0]
mov ecx, dword [esp + 0x10]
push 0
lea edx, [esp + 0x2c]
push edx
mov edx, dword [edi + 4]
push ecx
push eax
push edx
mov dword [esp + 0x30], eax
call dword [0x571190]
test eax, eax
je 0x510f4e
shr ebp, 2
mov eax, ebx
test ebp, ebp
je 0x510d98
jmp 0x510d70
xor esi, 0x65ac9365
lea edx, [esi + esi]
xor edx, esi
mov ecx, esi
shr ecx, 1
add edx, edx
xor ecx, esi
add edx, edx
shr ecx, 3
add edx, edx
xor ecx, edx
xor esi, ecx
xor dword [eax], esi
dec ebp
add eax, 4
test ebp, ebp
jne 0x510d70
mov eax, dword [esp + 0x14]
add eax, 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jns 0x510e04
mov ebp, dword [esp + 0x1c]
mov esi, dword [0x5710dc]
push ebp
call esi
push eax
call dword [0x5710d8]
push ebp
call esi
mov ebp, dword [0x5710d4]
push eax
call ebp
push ebx
call esi
push eax
call dword [0x5710d8]
push ebx
call esi
push eax
call ebp
mov ecx, dword [edi + 4]
push ecx
call dword [0x5710e8]
mov esi, dword [esp + 0x24]
mov ebx, dword [0x5710d0]
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
jmp 0x510ad0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
add eax, ecx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
lea edx, [esi + esi*2]
mov eax, dword [ebx + edx*4]
add eax, ebp
push eax
lea ecx, [esp + 0x550]
push ecx
call dword [0x571104]
test eax, eax
jge 0x510e37
dec esi
mov dword [esp + 0x14], esi
jmp 0x510e3e
jle 0x510e4d
inc esi
mov dword [esp + 0x10], esi
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x10], edx
jle 0x510e00
jmp 0x510db1
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], eax
jg 0x510db1
lea eax, [esi + esi*2]
mov ecx, dword [ebx + eax*4 + 4]
mov esi, dword [0x5710dc]
lea eax, [ebx + eax*4]
mov dword [edi + 8], ecx
mov edx, dword [eax + 8]
push ebp
mov dword [edi + 0xc], edx
call esi
push eax
call dword [0x5710d8]
push ebp
call esi
mov ebp, dword [0x5710d4]
push eax
call ebp
push ebx
call esi
push eax
call dword [0x5710d8]
push ebx
call esi
push eax
call ebp
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push 0
push 0
push eax
push ecx
call dword [0x57118c]
cmp eax, 0xffffffff
jne 0x510fb2
mov edx, dword [esp + 0x18]
push edx
push 0x573a00
push 2
call fcn.005139a0
mov eax, dword [edi + 4]
add esp, 0xc
push eax
call dword [0x5710e8]
push edi
call esi
push eax
call dword [0x5710d8]
push edi
call esi
push eax
call ebp
xor eax, eax
jmp 0x510fba
push str.OpenFastFile_:
push 2
call fcn.005139a0
mov edx, dword [edi + 4]
add esp, 8
push edx
jmp 0x510fe7
mov eax, dword [esp + 0x18]
push eax
push 0x5739d4
push 2
call fcn.005139a0
mov esi, dword [0x5710dc]
add esp, 0xc
push ebx
call esi
mov ebp, dword [0x5710d8]
push eax
call ebp
push ebx
call esi
mov ebx, dword [0x5710d4]
push eax
call ebx
mov ecx, dword [edi + 4]
push ecx
call dword [0x5710e8]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x510fba
mov edx, dword [esp + 0x18]
push edx
push 0x5739d4
push 2
call fcn.005139a0
mov eax, dword [esp + 0x28]
mov esi, dword [0x5710dc]
add esp, 0xc
push eax
call esi
mov ebp, dword [0x5710d8]
push eax
call ebp
mov ecx, dword [esp + 0x1c]
push ecx
call esi
push eax
call dword [0x5710d4]
push ebx
call esi
push eax
call ebp
push ebx
call esi
mov ebx, dword [0x5710d4]
push eax
call ebx
mov edx, dword [edi + 4]
push edx
call dword [0x5710e8]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x510fba
mov dword [edi], 1
mov eax, edi
mov ecx, dword [esp + 0x650]
pop esi
pop ebx
pop edi
pop ebp
xor ecx, esp
call fcn.00517235
add esp, 0x644
ret
push ebp
push 0x5739d4
push 2
call fcn.005139a0
mov ecx, dword [edi + 4]
add esp, 0xc
push ecx
call dword [0x5710e8]
mov esi, dword [0x5710dc]
push edi
call esi
push eax
call dword [0x5710d8]
push edi
call esi
push eax
call dword [0x5710d4]
xor eax, eax
jmp 0x510fba