Function at 0x1004eba
Capabilities:
Generate random numbers via winapi
Get common file path
Get disk information
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a4
push ebx
xor ebx, ebx
cmp byte [0x100ad60], bl
lea eax, [ebp - 0x74]
mov dword [ebp - 4], 0x5c3a63
mov byte [ebp - 6], 0x63
mov byte [ebp - 5], 0x63
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x54], 0xc
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x2c], ebx
je 0x1004f1c
push ebx
push ebx
push 0x100ad60
call fcn.010045fa
test eax, eax
jne 0x1005376
mov byte [0x100ad60], bl
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.01003d4e
test eax, eax
jne 0x1004f38
push 0xffffffffffffffff
jmp 0x10053a2
push esi
push edi
push 1
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x1004fc4
push 2
push 0x100
lea eax, [ebp - 0x1a4]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x1004fc4
push dword [ebp - 0x40]
mov esi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
mov edi, 0x10000000
push edi
push 2
lea eax, [ebp - 0x1a4]
push eax
call esi
test eax, eax
je 0x1004fc4
push dword [ebp - 0x20]
lea eax, [ebp - 0x1a4]
push edi
push 2
push eax
call esi
test eax, eax
je 0x1004fc4
push dword [ebp - 0x28]
lea eax, [ebp - 0x1a4]
push edi
push 2
push eax
call esi
test eax, eax
je 0x1004fc4
push ebx
lea eax, [ebp - 0x1a4]
push eax
push 1
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x1004fc4
lea eax, [ebp - 0x54]
mov dword [ebp - 0x2c], eax
cmp dword [0x101b0c0], ebx
jne 0x1004fe9
cmp dword [0x100a18c], ebx
je 0x1004fe9
push 0x100ad60
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x10052f0
push pe_overlay
push 0x100b0c0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov bl, byte [0x100b0c0]
and dword [ebp - 0x24], 0
and dword [ebp - 0x20], 0
or bl, 0x20
call fcn.010029ca
mov cl, 0x61
mov byte [ebp - 0xd], al
mov byte [ebp - 4], cl
cmp cl, byte [ebp - 0xd]
je 0x100511c
push 0x400
lea eax, [ebp - 0x5a4]
push eax
lea eax, [ebp - 4]
push eax
mov byte [ebp - 2], 0
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
mov byte [ebp - 2], 0x5c
je 0x1005119
lea eax, [ebp - 0x5a4]
push eax
call dword [sym.imp.msvcrt.dll__strlwr]
mov esi, dword [sym.imp.msvcrt.dll_strstr]
lea eax, [ebp - 0x5a4]
mov dword [esp], 0x1002638
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1005087
lea eax, [ebp - 0x5a4]
push 0x1002630
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x1005119
push dword [ebp - 4]
call fcn.01002acc
mov edi, eax
test edi, edi
je 0x1005119
lea eax, [ebp - 4]
push eax
call fcn.01002907
test eax, eax
je 0x1005119
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x1005119
mov eax, dword [ebp - 0x3c]
imul eax, dword [ebp - 0x48]
mul dword [ebp - 0x44]
mov cl, byte [ebp - 4]
cmp cl, bl
mov dword [ebp - 0x1c], 1
mov esi, edx
jne 0x10050e6
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
jmp 0x100511c
cmp edi, 2
jne 0x1005102
cmp esi, dword [ebp - 0x30]
jb 0x1005102
ja 0x10050f7
cmp eax, dword [ebp - 0x34]
jbe 0x1005102
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], esi
mov byte [ebp - 5], cl
jmp 0x100511c
cmp esi, dword [ebp - 0x14]
jb 0x100511c
ja 0x100510e
cmp eax, dword [ebp - 0x18]
jbe 0x100511c
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], esi
mov byte [ebp - 6], cl
jmp 0x100511c
mov cl, byte [ebp - 4]
inc cl
cmp cl, 0x7a
mov byte [ebp - 4], cl
jle 0x1005017
xor esi, esi
cmp dword [ebp - 0x1c], esi
jne 0x100513b
push 0x20000008
jmp 0x10053a2
mov eax, dword [0x100a01c]
cmp eax, 0xcab00eee
je 0x1005155
xor ecx, ecx
cmp dword [ebp - 0x14], ecx
ja 0x100516f
jb 0x1005155
cmp dword [ebp - 0x18], eax
jae 0x100516f
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x14], eax
ja 0x100516f
jb 0x1005167
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 0x24]
jae 0x100516f
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
jmp 0x1005175
mov bl, byte [ebp - 6]
mov ecx, dword [ebp - 0x18]
mov eax, dword [0x100a014]
push 3
pop edx
mul edx
cmp dword [ebp - 0x14], edx
jb 0x100518f
ja 0x100518a
cmp ecx, eax
jb 0x100518f
mov byte [ebp - 4], bl
jmp 0x10051a9
cmp dword [ebp - 0x30], edx
jb 0x100539d
ja 0x10051a3
cmp dword [ebp - 0x34], eax
jb 0x100539d
mov al, byte [ebp - 5]
mov byte [ebp - 4], al
push 0xf0000000
push 1
push esi
push esi
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x100528b
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], esi
mov ebx, 0x100ad60
lea eax, [ebp - 0xa4]
push eax
push 0x10
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1005238
lea eax, [ebp - 4]
push eax
push 0x100262c
push ebx
call edi
movzx ecx, byte [ebp - 0xa4]
add esp, 0xc
and ecx, 7
add ecx, 9
push 0
mov dword [ebp - 0x14], ecx
pop esi
je 0x1005238
lea eax, [eax + 0x100ad60]
mov dword [ebp - 0x28], eax
movzx eax, byte [ebp + esi - 0xa4]
push eax
push 0x1002624
push dword [ebp - 0x28]
call edi
add dword [ebp - 0x28], 2
add esp, 0xc
inc esi
cmp esi, dword [ebp - 0x14]
jb 0x1005218
cmp byte [0x100ad60], 0
je 0x1005257
xor esi, esi
inc esi
push esi
push dword [ebp - 0x2c]
push ebx
call fcn.010045fa
test eax, eax
je 0x100525e
mov dword [ebp - 0xc], esi
jmp 0x100525e
mov dword [ebp - 0x20], 1
inc dword [ebp - 0x1c]
cmp dword [ebp - 0xc], 0
jne 0x100527a
cmp dword [ebp - 0x20], 0
jne 0x100527a
cmp dword [ebp - 0x1c], 0x2710
jb 0x10051d5
push 0
push dword [ebp - 0x38]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0xc], 0
jne 0x10052f0
mov esi, 0x100ad60
push esi
push 0x1002618
lea eax, [ebp - 4]
push eax
call fcn.01002b66
mov edi, eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebp - 0x5c]
imul eax, dword [0x100a014]
push edi
and eax, 0xffff
push eax
call fcn.01002c34
xor edi, edi
inc edi
push edi
push dword [ebp - 0x2c]
push esi
call fcn.010045fa
test eax, eax
jne 0x10052ed
push 0x52
jmp 0x10053a2
mov dword [ebp - 0xc], edi
xor ebx, ebx
cmp dword [0x101b0c0], ebx
jne 0x1005380
cmp dword [0x100a18c], ebx
je 0x1005380
mov edi, 0x100ad60
push ebx
push 0x1003ea1
push dword [0x100aae4]
push 0x6b
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 0xffffffff
je 0x1004f31
cmp eax, ebx
je 0x1005379
cmp byte [eax], 0
je 0x1005379
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x100533c
sub ecx, esi
inc ecx
cmp ecx, 0x104
jae 0x10052e6
mov edx, edi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1005352
push ebx
push ebx
push edi
call fcn.010045fa
test eax, eax
je 0x100536f
mov dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], ebx
je 0x100530b
pop edi
pop esi
pop ebx
leave
ret
push 0x4c7
jmp 0x10053a2
cmp dword [ebp - 0xc], ebx
jne 0x1005374
push 1
push dword [ebp - 0x2c]
push 0x100ad60
call fcn.010045fa
test eax, eax
jne 0x1005374
jmp 0x10052e6
push 0x20000009
call fcn.01003827
int3