Function at 0x401a80
Capabilities:
Generate random numbers via rtlgenrandom
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x41a004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, ecx
push 0
push 0x40000080
push 3
push 0
push 1
push 0xc0000000
push ebx
mov dword [ebp - 0x54], ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
jne 0x401ada
push 0
push 0x40000080
push 3
push 0
push 1
push 0xc0000000
push ebx
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x401cfb
lea eax, [ebp - 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x50]
or eax, dword [ebp - 0x4c]
je 0x401cf4
push 0
push 0
push dword [0x41b2c8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
je 0x401cf4
push 4
push 0x3000
push 0x100520
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x58], edi
test edi, edi
je 0x401cfb
push 0x100084
mov dword [edi + 0x14], esi
lea eax, [edi + 0x70]
mov ecx, dword [ebp - 0x50]
lea ebx, [edi + 0x1000fc]
mov edx, dword [ebp - 0x4c]
push 0
push eax
mov dword [ebx], ecx
mov dword [ebx + 4], edx
mov dword [edi + 0x10], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x100108], 0
mov dword [edi + 0x10010c], 0
call fcn.004033c0
add esp, 0xc
push ebx
push dword [edi + 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push dword [ebp - 0x54]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [edi + 0x100110]
push eax
call esi
push dword [ebp - 0x54]
add edi, 0x100318
push edi
call esi
push 0x418d7c
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov esi, dword [ebp - 0x58]
mov ecx, dword [ebx + 4]
mov eax, dword [ebx]
mov dword [esi + 0x1000f4], 0x100000
mov dword [esi + 0x1000f8], 3
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x100104], 0
test ecx, ecx
jne 0x401bf6
cmp eax, 0x800000
jae 0x401bf6
mov dword [esi + 0x28], ecx
jmp 0x401c81
mov dword [esi + 0x28], 1
test ecx, ecx
jne 0x401c08
cmp eax, 0x8000000
jb 0x401c81
mov dword [esi + 0x28], 2
test ecx, ecx
jne 0x401c1a
cmp eax, 0x20000000
jb 0x401c81
mov dword [esi + 0x28], 4
test ecx, ecx
jne 0x401c2c
cmp eax, 0x80000000
jb 0x401c81
mov dword [esi + 0x28], 8
cmp ecx, 2
jb 0x401c81
ja 0x401c3e
test eax, eax
jb 0x401c81
mov dword [esi + 0x28], 0x10
cmp ecx, 8
jb 0x401c81
ja 0x401c50
test eax, eax
jb 0x401c81
mov dword [esi + 0x28], 0x40
cmp ecx, 0x80
jb 0x401c81
ja 0x401c65
test eax, eax
jb 0x401c81
mov dword [esi + 0x28], 0x100
cmp ecx, 0x800
jb 0x401c81
ja 0x401c7a
test eax, eax
jb 0x401c81
mov dword [esi + 0x28], 0x200
push 0x40
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_SystemFunction036]
lea edi, [esi + 0x2c]
mov ebx, 0x10
lea eax, [ebp - 0x48]
sub eax, edi
mov dword [ebp - 0x54], eax
nop dword [eax]
xor esi, esi
mov dword [edi], 0
xor ecx, ecx
lea edx, [eax + edi]
nop dword [eax]
movzx eax, byte [edx]
lea edx, [edx + 1]
shl eax, cl
add ecx, 8
or esi, eax
cmp ecx, 0x20
jl 0x401cb0
mov eax, dword [ebp - 0x54]
mov dword [edi], esi
add edi, 4
sub ebx, 1
jne 0x401ca0
mov edi, dword [ebp - 0x58]
push edi
push 0
push 0
push dword [0x41b2c8]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040232e
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040232e
mov esp, ebp
pop ebp
ret