Function at 0x507230
Capabilities:
Encrypt data using rc4 ksa
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], 0
movzx ecx, word [edi + 0x1a]
movzx edx, word [edi + 0x18]
movsx esi, dx
movsx eax, cx
imul esi, eax
cmp esi, 0x18
je 0x507391
cmp esi, 0x20
je 0x50730e
cmp dword [edi + 0x16c], 3
jne 0x5072ee
mov esi, dword [ebp + 0x14]
mov eax, dword [esi]
cmp eax, 0x7c00
jne 0x50729a
cmp dword [esi + 4], 0x3e0
jne 0x50729a
cmp dword [esi + 8], 0x1f
jne 0x50729a
mov dword [edi], 0x80
mov ecx, 2
jmp 0x5073b1
cmp eax, 0xf800
jne 0x5072d0
cmp dword [esi + 4], 0x7e0
jne 0x5072d0
cmp dword [esi + 8], 0x1f
jne 0x5072d0
cmp dx, 1
jne 0x5072c1
mov eax, 0x100
cmp cx, 0x10
je 0x5072c6
mov eax, 0x104
mov ecx, 2
jmp 0x5073af
mov dword [ebp - 0x10], 1
mov ecx, 3
mov dword [edi], 8
mov dword [edi + 0x18], 0x180001
jmp 0x5073b1
cmp dx, 1
jne 0x5072ff
mov eax, 0x80
cmp cx, 0xf
jge 0x507304
mov eax, 0x84
mov ecx, 2
jmp 0x5073ac
cmp dword [edi + 0x16c], 3
jne 0x50736a
mov esi, dword [ebp + 0x14]
mov eax, dword [esi]
cmp eax, 0xff000000
jne 0x507337
mov dword [edi], 0x2000020
mov ecx, 4
mov dword [ebp - 0x10], 1
jmp 0x5073b1
cmp eax, 0xff0000
jne 0x50735d
cmp dword [esi + 4], 0xff00
jne 0x50735d
cmp dword [esi + 8], 0xff
jne 0x50735d
mov dword [edi], 0x2000020
mov ecx, 4
jmp 0x5073b1
mov dword [edi], 8
mov ecx, 4
jmp 0x5073b1
cmp dx, 1
jne 0x50737b
mov eax, 0x20
cmp cx, 0x20
je 0x507380
mov eax, 0x24
mov esi, dword [ebp + 0x14]
or eax, 0x2000000
mov dword [edi], eax
mov ecx, 4
jmp 0x5073b1
cmp dx, 1
jne 0x5073a2
mov eax, 8
cmp cx, 0x18
je 0x5073a7
mov eax, 0xc
mov ecx, 3
mov esi, dword [ebp + 0x14]
mov dword [edi], eax
mov eax, dword [edi + 0x10]
imul eax, ecx
push edi
push dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov dword [edi + 8], 1
mov dword [edi + 0x20], eax
lea ebx, [eax + 3]
and ebx, 0xfffffffc
sub ebx, eax
mov dword [ebp - 0xc], ebx
call fcn.00456000
movzx eax, ax
add esp, 8
mov dword [ebp - 4], eax
test ax, ax
jne 0x5078c0
cmp word [edi + 0x18], 1
jne 0x507833
cmp word [ebp - 0x10], ax
je 0x507719
cmp word [edi + 0x1a], 0x20
jne 0x507566
mov edx, dword [esi + 0xc]
xor ecx, ecx
nop
mov eax, 1
shl eax, cl
test edx, eax
jne 0x507421
inc ecx
cmp ecx, 0x20
jl 0x507410
mov edx, dword [esi + 8]
mov dword [ebp - 0x14], ecx
xor ecx, ecx
lea esp, [esp]
mov eax, 1
shl eax, cl
test edx, eax
jne 0x507441
inc ecx
cmp ecx, 0x20
jl 0x507430
mov edx, dword [esi + 4]
mov dword [ebp + 0x10], ecx
xor ecx, ecx
lea esp, [esp]
mov eax, 1
shl eax, cl
test edx, eax
jne 0x507461
inc ecx
cmp ecx, 0x20
jl 0x507450
mov edx, dword [esi]
mov dword [ebp - 0x10], ecx
xor ecx, ecx
jmp 0x507470
mov eax, 1
shl eax, cl
test edx, eax
jne 0x507481
inc ecx
cmp ecx, 0x20
jl 0x507470
cmp dword [edi + 0x14], 0
mov dword [ebp - 8], ecx
mov dword [ebp - 0x18], 0
jle 0x5078a9
jmp 0x5074a0
cmp dword [edi + 0x10], 0
mov esi, dword [edi + 0xc]
mov dword [ebp - 4], 0
jle 0x507505
mov ebx, dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.0045d030
mov ecx, dword [ebp + 0x10]
lea esi, [esi + 4]
mov edx, eax
add esp, 4
mov eax, dword [ebx + 8]
and eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [esi - 4], al
mov eax, dword [ebx + 4]
and eax, edx
shr eax, cl
mov ecx, dword [ebp - 8]
mov byte [esi - 3], al
mov eax, dword [ebx]
and eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x14]
mov byte [esi - 2], al
mov eax, dword [ebx + 0xc]
and eax, edx
shr eax, cl
mov byte [esi - 1], al
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp eax, dword [edi + 0x10]
jl 0x5074b3
mov ebx, dword [ebp - 0xc]
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0xc]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
mov dword [ebp - 4], esi
test si, si
jne 0x5078ac
xor esi, esi
test ebx, ebx
jle 0x507547
jmp 0x507530
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
add esp, 4
cmp eax, 0xffffffff
je 0x50755f
inc esi
cmp esi, ebx
jl 0x507530
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [edi + 0x14]
jl 0x5074a0
jmp 0x5078ac
mov esi, 4
jmp 0x50754a
mov eax, dword [edi + 0x10]
mov esi, 1
mov ebx, dword [ebp + 0x14]
add eax, eax
mov edx, dword [ebx + 8]
lea ecx, [eax + 3]
and ecx, 0xfffffffc
sub ecx, eax
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
mov eax, esi
shl eax, cl
test edx, eax
jne 0x507591
inc ecx
cmp ecx, 0x10
jl 0x507583
mov dword [ebp - 0x18], ecx
mov eax, esi
mov ecx, 0x10
jmp 0x5075a0
test eax, edx
je 0x5075a6
add esi, esi
rol eax, 1
dec ecx
jne 0x5075a0
mov edx, dword [ebx + 4]
dec esi
mov dword [ebp - 0x14], esi
mov esi, 1
mov eax, esi
shl eax, cl
test edx, eax
jne 0x5075c5
inc ecx
cmp ecx, 0x10
jl 0x5075b7
mov dword [ebp - 0x10], ecx
mov eax, esi
mov ecx, 0x10
nop
test eax, edx
je 0x5075d6
add esi, esi
rol eax, 1
dec ecx
jne 0x5075d0
mov edx, dword [ebx]
dec esi
mov dword [ebp - 0xc], esi
mov esi, 1
mov eax, esi
shl eax, cl
test edx, eax
jne 0x5075f4
inc ecx
cmp ecx, 0x10
jl 0x5075e6
mov dword [ebp - 8], ecx
mov eax, esi
mov ecx, 0x10
mov edi, edi
test eax, edx
je 0x507606
add esi, esi
rol eax, 1
dec ecx
jne 0x507600
dec esi
mov dword [ebp - 0x24], esi
cmp dword [ebp - 0x14], ecx
je 0x507829
cmp dword [ebp - 0xc], ecx
je 0x507829
test esi, esi
je 0x507829
mov dword [ebp - 0x20], ecx
cmp dword [edi + 0x14], ecx
jle 0x5078a9
cmp dword [edi + 0x10], 0
mov eax, dword [edi + 0xc]
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], 0
jle 0x5076bb
push dword [ebp + 8]
call fcn.0045d210
mov ecx, dword [ebp - 0x18]
xor edx, edx
movzx esi, ax
add esp, 4
mov eax, dword [ebx + 8]
and eax, esi
shr eax, cl
imul eax, eax, 0xff
mov ecx, dword [ebp + 0x10]
div dword [ebp - 0x14]
xor edx, edx
mov byte [ecx], al
inc ecx
mov eax, dword [ebx + 4]
and eax, esi
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp - 0x10]
shr eax, cl
imul eax, eax, 0xff
mov ecx, dword [ebp + 0x10]
div dword [ebp - 0xc]
xor edx, edx
mov byte [ecx], al
inc ecx
mov eax, dword [ebx]
and eax, esi
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp - 8]
shr eax, cl
imul eax, eax, 0xff
mov ecx, dword [ebp + 0x10]
div dword [ebp - 0x24]
mov byte [ecx], al
inc ecx
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp + 0x10], ecx
mov dword [ebp - 4], eax
cmp eax, dword [edi + 0x10]
jl 0x507648
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0xc]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
mov dword [ebp - 4], esi
test si, si
jne 0x5078ac
xor esi, esi
cmp dword [ebp - 0x1c], esi
jle 0x5076fa
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
add esp, 4
cmp eax, 0xffffffff
je 0x507712
inc esi
cmp esi, dword [ebp - 0x1c]
jl 0x5076e2
mov esi, dword [ebp - 4]
mov ecx, dword [ebp - 0x20]
inc ecx
mov dword [ebp - 0x20], ecx
cmp ecx, dword [edi + 0x14]
jl 0x507635
jmp 0x5078ac
mov esi, 4
jmp 0x5076fd
mov eax, dword [ebp - 8]
cmp eax, 2
jne 0x5077b2
cmp dword [edi + 0x14], 0
mov dword [ebp + 0x10], 0
jle 0x5078a9
mov esi, dword [edi + 0xc]
xor ebx, ebx
cmp dword [edi + 0x10], ebx
jle 0x507757
push dword [ebp + 8]
call fcn.0045d210
mov word [esi], ax
lea esi, [esi + 2]
inc ebx
add esp, 4
cmp ebx, dword [edi + 0x10]
jl 0x507740
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0xc]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
mov dword [ebp - 4], esi
test si, si
jne 0x5078ac
mov ebx, dword [ebp - 0xc]
xor esi, esi
test ebx, ebx
jle 0x507797
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00597fff
add esp, 4
cmp eax, 0xffffffff
je 0x5077ab
inc esi
cmp esi, ebx
jl 0x507780
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
inc eax
mov dword [ebp + 0x10], eax
cmp eax, dword [edi + 0x14]
jl 0x507736
jmp 0x5078ac
mov esi, 4
jmp 0x50779a
cmp dword [edi + 0x14], 0
mov dword [ebp - 0x20], 0
jle 0x5078a9
mov ecx, dword [ebp + 8]
push dword [ecx]
push eax
push dword [edi + 0x10]
push dword [edi + 0xc]
call fcn.00595b79
add esp, 0x10
cmp eax, dword [ebp - 8]
jne 0x507829
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0xc]
call fcn.004585b0
movzx esi, ax
add esp, 0x10
test si, si
jne 0x5078ac
test ebx, ebx
jle 0x507815
mov edi, ebx
mov ebx, dword [ebp + 8]
push dword [ebx]
call fcn.00597fff
add esp, 4
dec edi
jne 0x507802
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x20]
inc eax
cmp eax, dword [edi + 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 8]
jl 0x5077c3
jmp 0x5078ac
mov esi, 4
jmp 0x5078ac
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 8]
imul eax, ecx
mov dword [ebp - 0x20], 0
test eax, eax
jle 0x5078a9
mov eax, dword [ebp + 8]
push dword [eax]
push ecx
push dword [edi + 0x10]
push dword [edi + 0xc]
call fcn.00595b79
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0xc]
call fcn.004585b0
movzx esi, ax
add esp, 0x20
test si, si
jne 0x5078ac
test ebx, ebx
jle 0x507893
mov edi, ebx
mov ebx, dword [ebp + 8]
lea ebx, [ebx]
push dword [ebx]
call fcn.00597fff
add esp, 4
dec edi
jne 0x507880
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp - 0xc]
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
imul eax, ecx
inc edx
mov dword [ebp - 0x20], edx
cmp edx, eax
jl 0x507847
jmp 0x5078ac
mov esi, dword [ebp - 4]
push 0
push 0
push 0
push dword [ebp + 0xc]
call fcn.00453f80
add esp, 0x10
mov ax, si
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret