Function at 0x5087e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x644
mov eax, dword [0x597670]
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 [0x5690e4]
push eax
call dword [0x5690e0]
mov edi, eax
test edi, edi
jne 0x508840
push str.OpenFastFile_:
push 2
call fcn.0050b810
add esp, 8
pop edi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0050f0b5
add esp, 0x644
ret
push ebx
push esi
mov esi, dword [0x56915c]
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 0x508e48
push 0x7695d8
call dword [0x5690f8]
test eax, eax
je 0x50893b
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.005103d1
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x5088ea
cmp al, 0x2f
je 0x5088ea
mov ebx, dword [0x5690d0]
push 0x768420
lea ecx, [esp + 0x148]
push ecx
call ebx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x148]
push eax
call dword [0x569100]
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x48]
push edx
call ebx
jmp 0x5088f0
mov ebx, dword [0x5690d0]
lea eax, [esp + 0x248]
push eax
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x150]
push 0x7695d8
push eax
call fcn.005101bf
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 0x508941
mov ebx, dword [0x5690d0]
cmp dword [edi + 4], 0xffffffff
jne 0x508e48
push ebp
xor esi, esi
call dword [0x5690f8]
dec eax
mov dword [esp + 0x20], eax
lea esp, [esp]
inc esi
cmp esi, eax
mov dword [esp + 0x24], esi
jge 0x508ac2
lea ecx, [ecx]
mov al, byte [esi + ebp]
cmp al, 0x5c
je 0x50897f
cmp al, 0x2f
jne 0x508aa1
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 [0x56915c]
mov dword [edi + 4], eax
cmp eax, 0xffffffff
jne 0x508a9b
push 0x7695d8
call dword [0x5690f8]
test eax, eax
je 0x508a9b
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.005103d1
mov al, byte [esp + 0x58]
add esp, 0x14
cmp al, 0x5c
je 0x508a4e
cmp al, 0x2f
je 0x508a4e
push 0x768420
lea eax, [esp + 0x148]
push eax
call ebx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x148]
push edx
call dword [0x569100]
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 0x7695d8
push edx
call fcn.005101bf
add esp, 0x14
push 0
push 0x8000080
push 3
push 0
push 1
push 0x80000000
lea eax, [esp + 0x15c]
push eax
call dword [0x56915c]
mov dword [edi + 4], eax
cmp dword [edi + 4], 0xffffffff
jne 0x508ad7
movsx ecx, byte [esi + ebp]
push ecx
call fcn.005134cd
add esp, 4
test eax, eax
je 0x508ab3
inc esi
inc esi
cmp esi, dword [esp + 0x20]
mov dword [esp + 0x24], esi
jl 0x508970
push ebp
push 0x56ba08
push 2
call fcn.0050b810
add esp, 0xc
jmp 0x508e7d
cmp esi, dword [esp + 0x20]
jge 0x508ac2
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 [0x569190]
test eax, eax
je 0x508e63
mov eax, 8
xor ecx, ecx
jmp 0x508b10
mov edx, dword [esp + ecx + 0x30]
cmp edx, dword [ecx + str.ESC_ARC2]
jne 0x508e63
sub eax, 4
add ecx, 4
cmp eax, 4
jae 0x508b10
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 [0x5690e4]
push eax
call dword [0x5690e0]
mov ebx, eax
test ebx, ebx
je 0x508d7a
mov eax, dword [edi + 4]
push 0
lea edx, [esp + 0x2c]
push edx
push ebp
push ebx
push eax
call dword [0x569190]
test eax, eax
je 0x508d92
mov ecx, dword [esp + 0x10]
push ecx
push 0
call dword [0x5690e4]
push eax
call dword [0x5690e0]
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 [0x569190]
test eax, eax
je 0x508dde
shr ebp, 2
mov eax, ebx
test ebp, ebp
je 0x508c28
jmp 0x508c00
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 0x508c00
mov eax, dword [esp + 0x14]
add eax, 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
jns 0x508c94
mov ebp, dword [esp + 0x1c]
mov esi, dword [0x5690dc]
push ebp
call esi
push eax
call dword [0x5690d8]
push ebp
call esi
mov ebp, dword [0x5690d4]
push eax
call ebp
push ebx
call esi
push eax
call dword [0x5690d8]
push ebx
call esi
push eax
call ebp
mov ecx, dword [edi + 4]
push ecx
call dword [0x5690e8]
mov esi, dword [esp + 0x24]
mov ebx, dword [0x5690d0]
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
jmp 0x508960
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 [0x569104]
test eax, eax
jge 0x508cc7
dec esi
mov dword [esp + 0x14], esi
jmp 0x508cce
jle 0x508cdd
inc esi
mov dword [esp + 0x10], esi
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x10], edx
jle 0x508c90
jmp 0x508c41
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x10], eax
jg 0x508c41
lea eax, [esi + esi*2]
mov ecx, dword [ebx + eax*4 + 4]
mov esi, dword [0x5690dc]
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 [0x5690d8]
push ebp
call esi
mov ebp, dword [0x5690d4]
push eax
call ebp
push ebx
call esi
push eax
call dword [0x5690d8]
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 [0x56918c]
cmp eax, 0xffffffff
jne 0x508e42
mov edx, dword [esp + 0x18]
push edx
push 0x56b9d0
push 2
call fcn.0050b810
mov eax, dword [edi + 4]
add esp, 0xc
push eax
call dword [0x5690e8]
push edi
call esi
push eax
call dword [0x5690d8]
push edi
call esi
push eax
call ebp
xor eax, eax
jmp 0x508e4a
push str.OpenFastFile_:
push 2
call fcn.0050b810
mov edx, dword [edi + 4]
add esp, 8
push edx
jmp 0x508e77
mov eax, dword [esp + 0x18]
push eax
push 0x56b9a4
push 2
call fcn.0050b810
mov esi, dword [0x5690dc]
add esp, 0xc
push ebx
call esi
mov ebp, dword [0x5690d8]
push eax
call ebp
push ebx
call esi
mov ebx, dword [0x5690d4]
push eax
call ebx
mov ecx, dword [edi + 4]
push ecx
call dword [0x5690e8]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x508e4a
mov edx, dword [esp + 0x18]
push edx
push 0x56b9a4
push 2
call fcn.0050b810
mov eax, dword [esp + 0x28]
mov esi, dword [0x5690dc]
add esp, 0xc
push eax
call esi
mov ebp, dword [0x5690d8]
push eax
call ebp
mov ecx, dword [esp + 0x1c]
push ecx
call esi
push eax
call dword [0x5690d4]
push ebx
call esi
push eax
call ebp
push ebx
call esi
mov ebx, dword [0x5690d4]
push eax
call ebx
mov edx, dword [edi + 4]
push edx
call dword [0x5690e8]
push edi
call esi
push eax
call ebp
push edi
call esi
push eax
call ebx
xor eax, eax
jmp 0x508e4a
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.0050f0b5
add esp, 0x644
ret
push ebp
push 0x56b9a4
push 2
call fcn.0050b810
mov ecx, dword [edi + 4]
add esp, 0xc
push ecx
call dword [0x5690e8]
mov esi, dword [0x5690dc]
push edi
call esi
push eax
call dword [0x5690d8]
push edi
call esi
push eax
call dword [0x5690d4]
xor eax, eax
jmp 0x508e4a