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

Disassembly:
push ebp
lea ebp, [esp - 0x52c]
sub esp, 0x5a8
mov eax, dword [0x100a028]
push ebx
xor ebx, ebx
cmp byte [0x100ad60], bl
mov dword [ebp + 0x528], eax
lea eax, [ebp + 0x514]
mov dword [ebp - 0x10], 0x5c3a63
mov byte [ebp - 0x11], 0x63
mov byte [ebp - 0x12], 0x63
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x60], 0xc
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x38], ebx
je 0x1004b83
push ebx
push ebx
push 0x100ad60
call fcn.0100428f
test eax, eax
jne 0x1004fd6
mov byte [0x100ad60], al
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x50]
push eax
call fcn.010039e5
test eax, eax
jne 0x1004b9f
push 0xffffffffffffffff
jmp 0x1005013
push esi
push edi
push 1
lea eax, [ebp + 0x514]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x1004c31
push 2
push 0x100
lea eax, [ebp + 0x3f4]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x1004c31
push dword [ebp - 0x50]
mov esi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
mov edi, 0x10000000
push edi
push 2
lea eax, [ebp + 0x3f4]
push eax
call esi
test eax, eax
je 0x1004c31
push dword [ebp - 0x2c]
lea eax, [ebp + 0x3f4]
push edi
push 2
push eax
call esi
test eax, eax
je 0x1004c31
push dword [ebp - 0x34]
lea eax, [ebp + 0x3f4]
push edi
push 2
push eax
call esi
test eax, eax
je 0x1004c31
push ebx
lea eax, [ebp + 0x3f4]
push eax
push 1
lea eax, [ebp + 0x514]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x1004c31
lea eax, [ebp - 0x60]
mov dword [ebp - 0x38], eax
cmp dword [0x101b0c0], ebx
jne 0x1004c56
cmp dword [0x100a18c], ebx
je 0x1004c56
push 0x100ad60
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
jmp 0x1004f4c
push 0xffff
push 0x100b0c0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov bl, byte [0x100b0c0]
and dword [ebp - 0x30], 0
and dword [ebp - 0x2c], 0
or bl, 0x20
call fcn.01002838
mov cl, 0x61
mov byte [ebp - 0x19], al
mov byte [ebp - 0x10], cl
cmp cl, byte [ebp - 0x19]
je 0x1004d7d
push 0x400
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 0xe], 0
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
mov byte [ebp - 0xe], 0x5c
je 0x1004d7a
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.msvcrt.dll__strlwr]
mov esi, dword [sym.imp.msvcrt.dll_strstr]
lea eax, [ebp - 0xc]
mov dword [esp], 0x1002518
push eax
call esi
test eax, eax
pop ecx
pop ecx
jne 0x1004ce8
lea eax, [ebp - 0xc]
push 0x1002510
push eax
call esi
test eax, eax
pop ecx
pop ecx
je 0x1004d7a
push dword [ebp - 0x10]
call fcn.01002955
mov edi, eax
test edi, edi
je 0x1004d7a
lea eax, [ebp - 0x10]
push eax
call fcn.01002769
test eax, eax
je 0x1004d7a
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x1004d7a
mov eax, dword [ebp - 0x48]
imul eax, dword [ebp - 0x54]
mul dword [ebp - 0x4c]
mov cl, byte [ebp - 0x10]
cmp cl, bl
mov dword [ebp - 0x28], 1
mov esi, edx
jne 0x1004d47
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], esi
jmp 0x1004d7d
cmp edi, 2
jne 0x1004d63
cmp esi, dword [ebp - 0x3c]
jb 0x1004d63
ja 0x1004d58
cmp eax, dword [ebp - 0x40]
jbe 0x1004d63
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], esi
mov byte [ebp - 0x12], cl
jmp 0x1004d7d
cmp esi, dword [ebp - 0x20]
jb 0x1004d7d
ja 0x1004d6f
cmp eax, dword [ebp - 0x24]
jbe 0x1004d7d
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x11], cl
jmp 0x1004d7d
mov cl, byte [ebp - 0x10]
inc cl
cmp cl, 0x7a
mov byte [ebp - 0x10], cl
jle 0x1004c84
xor esi, esi
cmp dword [ebp - 0x28], esi
jne 0x1004d9c
push 0x20000008
jmp 0x1005013
mov eax, dword [0x100a020]
cmp eax, 0xcab00eee
je 0x1004db6
xor ecx, ecx
cmp dword [ebp - 0x20], ecx
ja 0x1004dd0
jb 0x1004db6
cmp dword [ebp - 0x24], eax
jae 0x1004dd0
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x20], eax
ja 0x1004dd0
jb 0x1004dc8
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x30]
jae 0x1004dd0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
jmp 0x1004dd6
mov bl, byte [ebp - 0x11]
mov ecx, dword [ebp - 0x24]
mov eax, dword [0x100a018]
push 3
pop edx
mul edx
cmp dword [ebp - 0x20], edx
jb 0x1004df0
ja 0x1004deb
cmp ecx, eax
jb 0x1004df0
mov byte [ebp - 0x10], bl
jmp 0x1004e0a
cmp dword [ebp - 0x3c], edx
jb 0x100500e
ja 0x1004e04
cmp dword [ebp - 0x40], eax
jb 0x100500e
mov al, byte [ebp - 0x12]
mov byte [ebp - 0x10], al
push 0xf0000000
push 1
push esi
push esi
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x1004eed
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov ebx, 0x100ad60
lea eax, [ebp + 0x4f4]
push eax
push 0x10
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1004e9a
lea eax, [ebp - 0x10]
push eax
push 0x100250c
push ebx
call edi
xor ecx, ecx
mov cl, byte [ebp + 0x4f4]
add esp, 0xc
push 0
pop esi
and ecx, 7
add ecx, 9
mov dword [ebp - 0x20], ecx
je 0x1004e9a
lea eax, [eax + 0x100ad60]
mov dword [ebp - 0x34], eax
movzx eax, byte [ebp + esi + 0x4f4]
push eax
push 0x1002504
push dword [ebp - 0x34]
call edi
add dword [ebp - 0x34], 2
add esp, 0xc
inc esi
cmp esi, dword [ebp - 0x20]
jb 0x1004e7a
cmp byte [0x100ad60], 0
je 0x1004eb9
xor esi, esi
inc esi
push esi
push dword [ebp - 0x38]
push ebx
call fcn.0100428f
test eax, eax
je 0x1004ec0
mov dword [ebp - 0x18], esi
jmp 0x1004ec0
mov dword [ebp - 0x2c], 1
inc dword [ebp - 0x28]
cmp dword [ebp - 0x18], 0
jne 0x1004edc
cmp dword [ebp - 0x2c], 0
jne 0x1004edc
cmp dword [ebp - 0x28], 0x2710
jb 0x1004e36
push 0
push dword [ebp - 0x44]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp dword [ebp - 0x18], 0
jne 0x1004f4c
mov esi, 0x100ad60
push esi
push 0x10024f8
lea eax, [ebp - 0x10]
push eax
call fcn.010029ff
mov edi, eax
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebp - 0x68]
imul eax, dword [0x100a018]
push edi
and eax, 0xffff
push eax
call fcn.01002ac7
xor edi, edi
inc edi
push edi
push dword [ebp - 0x38]
push esi
call fcn.0100428f
test eax, eax
jne 0x1004f49
push 0x52
jmp 0x1005013
mov dword [ebp - 0x18], edi
xor ebx, ebx
cmp dword [0x101b0c0], ebx
jne 0x1004ff1
cmp dword [0x100a18c], ebx
je 0x1004ff1
mov edi, 0x100ad60
push ebx
push 0x1003b46
push dword [0x100aae4]
push 0x6b
push dword [0x100a05c]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
cmp eax, 0xffffffff
je 0x1004b98
cmp eax, ebx
je 0x1004fea
cmp byte [eax], 0
je 0x1004fea
mov ecx, eax
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x1004f9c
sub ecx, esi
inc ecx
cmp ecx, 0x104
jae 0x1004f42
mov edx, edi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x1004fb2
push ebx
push ebx
push edi
call fcn.0100428f
test eax, eax
je 0x1004fcf
mov dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], ebx
je 0x1004f6b
pop edi
pop esi
mov ecx, dword [ebp + 0x528]
pop ebx
call fcn.01005c72
add ebp, 0x52c
leave
ret
push 0x4c7
jmp 0x1005013
cmp dword [ebp - 0x18], ebx
jne 0x1004fd4
push 1
push dword [ebp - 0x38]
push 0x100ad60
call fcn.0100428f
test eax, eax
jne 0x1004fd4
jmp 0x1004f42
push 0x20000009
call fcn.010035c6
int3