Function at 0x50adc0
Capabilities:
Encode data using xor
Get disk information
Get storage device properties

Disassembly:
push ebp
lea ebp, [esp - 0x304]
sub esp, 0x304
push 0xfffffffffffffffe
push 0x559960
push 0x5277e0
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x463df0]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x300], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x24], 0
movzx eax, byte [0x46e23c]
xor al, 0x2a
mov byte [ebp + 0x2f4], al
movzx ecx, byte [0x46e23d]
xor cl, 0xc1
mov byte [ebp + 0x2f5], cl
movzx edx, byte [0x46e23e]
xor dl, 0x68
mov byte [ebp + 0x2f6], dl
movzx eax, byte [0x46e23f]
xor al, 0x7e
mov byte [ebp + 0x2f7], al
movzx ecx, byte [0x46e240]
xor cl, 0x2a
mov byte [ebp + 0x2f8], cl
movzx edx, byte [0x46e241]
xor dl, 0xc1
mov byte [ebp + 0x2f9], dl
mov byte [ebp + 0x2fa], 0
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov dword [ebp - 0x28], eax
mov ebx, 0x41
mov dword [ebp - 0x38], ebx
test eax, eax
je 0x50b219
test al, 1
je 0x50b202
mov byte [ebp + 0x2f8], bl
lea eax, [ebp + 0x2f8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
sub eax, 2
je 0x50aeb2
sub eax, 2
jmp 0x50aeb5
cmp ebx, 0x41
je 0x50b202
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea ecx, [ebp + 0x2f4]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x20], edi
mov esi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp edi, 0xffffffff
je 0x50b076
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
push eax
lea edx, [ebp - 0x24]
push edx
push 0x18
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push 0x74080
push edi
call esi
test eax, eax
je 0x50b071
mov al, byte [ebp - 0x51]
test al, al
jbe 0x50b071
and al, 0x10
neg al
sbb al, al
and al, 0xb5
add al, 0xec
mov bl, al
xor eax, eax
mov dword [ebp + 0x2d4], eax
mov dword [ebp + 0x2d8], eax
mov dword [ebp + 0x2dc], eax
mov dword [ebp + 0x2e0], eax
mov dword [ebp + 0x2e4], eax
mov dword [ebp + 0x2e8], eax
mov dword [ebp + 0x2ec], eax
mov dword [ebp + 0x2f0], eax
push 0x210
push eax
lea ecx, [ebp]
push ecx
call fcn.00526600
add esp, 0xc
mov byte [ebp + 0x2d4], 0
mov byte [ebp + 0x2d5], 2
mov byte [ebp + 0x2d9], 1
mov byte [ebp + 0x2da], 1
mov byte [ebp + 0x2dd], 0xb0
mov byte [ebp + 0x2de], bl
push 0
lea edx, [ebp - 0x24]
push edx
push 0x210
lea eax, [ebp]
push eax
push 0x20
lea ecx, [ebp + 0x2d4]
push ecx
push 0x7c088
push edi
call esi
test eax, eax
je 0x50b071
xor ebx, ebx
xor esi, esi
mov edi, edi
movzx edx, byte [ebp + esi + 0x42]
push edx
call fcn.00529347
xor al, 0xc1
mov byte [ebp + esi + 0x2a9], al
movzx eax, byte [ebp + esi + 0x43]
push eax
call fcn.00529347
add esp, 8
xor al, 0xc1
mov byte [ebp + esi + 0x2a8], al
add esi, 2
cmp esi, 0x28
jl 0x50afd0
test esi, esi
je 0x50b00a
lea ebx, [esi - 1]
xor esi, esi
cmp dword [0x46e288], esi
je 0x50b1f5
xor eax, eax
mov ecx, 0x46e288
nop
mov edx, dword [eax + 0x46e28c]
push edx
mov eax, dword [ecx]
push eax
mov eax, ebx
lea ecx, [ebp + 0x2a8]
call fcn.0050a8e0
add esp, 8
test eax, eax
je 0x50b059
push ebx
lea ecx, [ebp + 0x2a8]
push ecx
call fcn.0050a980
add esp, 8
mov byte [ebp - 0x19], al
test al, al
jne 0x50b1f5
inc esi
lea eax, [esi*8]
lea ecx, [eax + 0x46e288]
cmp dword [ecx], 0
jne 0x50b020
jmp 0x50b1f5
cmp edi, 0xffffffff
jne 0x50b09d
push 0
push 0
push 3
push 0
push 3
push 0
lea edx, [ebp + 0x2f4]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
je 0x50b202
mov edi, eax
push 0x96
push 0
lea eax, [ebp + 0x210]
push eax
call fcn.00526600
add esp, 0xc
push 0
lea ecx, [ebp - 0x24]
push ecx
push 0x96
lea edx, [ebp + 0x210]
push edx
push 0x96
mov eax, edx
push eax
push 0x2d1400
push edi
call esi
test eax, eax
je 0x50b1f5
cmp dword [ebp + 0x210], 0x28
jne 0x50b1f5
mov dword [ebp - 0x34], 0x4651d5
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp + 0x21c]
test eax, eax
je 0x50b134
lea edi, [ebp + eax + 0x210]
mov dword [ebp - 0x34], edi
xor esi, esi
cmp byte [edi], 0
je 0x50b12c
movsx ecx, byte [edi + esi]
push ecx
call fcn.00529347
add esp, 4
xor al, 0xc1
mov byte [edi + esi], al
inc esi
cmp byte [edi + esi], 0
jne 0x50b113
test esi, esi
je 0x50b134
dec esi
mov dword [ebp - 0x3c], esi
mov edi, 0x4651d5
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov eax, dword [ebp + 0x220]
cmp eax, ebx
je 0x50b177
lea edi, [ebp + eax + 0x210]
xor esi, esi
cmp byte [edi], 0
je 0x50b16f
movsx edx, byte [edi + esi]
push edx
call fcn.00529347
add esp, 4
xor al, 0xc1
mov byte [edi + esi], al
inc esi
cmp byte [edi + esi], 0
jne 0x50b156
cmp esi, ebx
je 0x50b177
dec esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], ebx
cmp dword [0x46e288], ebx
je 0x50b1f2
xor esi, esi
mov ebx, 0x46e288
mov eax, dword [esi + 0x46e28c]
push eax
mov ecx, dword [ebx]
push ecx
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x34]
call fcn.0050a8e0
add esp, 8
test eax, eax
jne 0x50b1ee
mov edx, dword [esi + 0x46e28c]
push edx
mov eax, dword [ebx]
push eax
mov esi, dword [ebp - 0x2c]
mov eax, esi
mov ecx, edi
call fcn.0050a8e0
add esp, 8
test eax, eax
je 0x50b1d3
push esi
push edi
call fcn.0050a980
add esp, 8
mov byte [ebp - 0x19], al
test al, al
jne 0x50b1f2
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
lea esi, [eax*8]
lea ebx, [esi + 0x46e288]
cmp dword [ebx], 0
jne 0x50b189
jmp 0x50b1f2
mov byte [ebp - 0x19], 1
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x19], 0
jne 0x50b219
mov eax, dword [ebp - 0x28]
shr eax, 1
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x38]
inc ebx
mov dword [ebp - 0x38], ebx
test eax, eax
jne 0x50ae8d
push 0x29
push 0
lea ecx, [ebp + 0x2a8]
push ecx
call fcn.00526600
xor eax, eax
mov dword [ebp + 0x2f4], eax
mov dword [ebp + 0x2f8], eax
mov word [ebp + 0x2fc], ax
push 0x210
push eax
lea edx, [ebp]
push edx
call fcn.00526600
add esp, 0x18
cmp byte [ebp - 0x19], 0
jne 0x50b280
cmp byte [ebp + 0x30c], 0
je 0x50b27a
mov dword [ebp - 4], 0
int 8
jmp 0x50b273
mov dword [ebp - 4], 0xfffffffe
cmp byte [ebp - 0x19], 0
je 0x50b28f
call fcn.004784f0
mov dword [eax], 6
mov al, 1
jmp 0x50b291
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x300]
xor ecx, ebp
call fcn.00526a8a
add ebp, 0x304
mov esp, ebp
pop ebp
ret