Function at 0x410040
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41d4e1
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x4263d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x20]
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x60], edi
push 0x10
mov dword [ebp - 0x54], 0
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x5c], edi
movups xmmword [ebp - 0x20], xmm0
call sub.ADVAPI32.dll_SystemFunction036
push esi
mov ecx, edi
call fcn.0040b680
push 1
push 0x41e808
mov ecx, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x54], 1
call fcn.0040ba30
xor eax, eax
mov dword [ebp - 0x28], 0
push eax
push 0x41e948
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
call fcn.00409fa0
mov esi, dword [ebp - 0x24]
xor eax, eax
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x38]
mov dword [ebp - 4], 1
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x58], 0x1a
nop dword [eax + eax]
movzx eax, byte [ebp + eax - 0x20]
xor edx, edx
div dword [ebp - 0x58]
add dl, 0x41
movsx ax, dl
movzx edx, ax
mov dword [ebp - 0x48], edx
cmp ecx, esi
jae 0x410143
lea eax, [ecx + 1]
cmp esi, 8
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
cmovae eax, edi
mov word [eax + ecx*2], dx
xor edx, edx
mov word [eax + ecx*2 + 2], dx
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x38]
jmp 0x410243
mov eax, 0x7ffffffe
mov dword [ebp - 0x3c], ecx
sub eax, ecx
cmp eax, 1
jb 0x4102cc
lea eax, [ecx + 1]
mov edx, esi
mov esi, eax
mov dword [ebp - 0x40], eax
or esi, 7
mov dword [ebp - 0x44], edx
cmp esi, 0x7ffffffe
jbe 0x410175
mov esi, 0x7ffffffe
jmp 0x410193
mov ecx, edx
mov eax, 0x7ffffffe
shr ecx, 1
sub eax, ecx
cmp edx, eax
jbe 0x41018b
mov esi, 0x7ffffffe
jmp 0x410193
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
xor ecx, ecx
mov eax, esi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x38]
call fcn.00409f40
cmp dword [ebp - 0x44], 8
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x24], esi
lea edx, [ecx + ecx]
lea ecx, [edx + eax]
mov dword [ebp - 0x3c], ecx
push edx
jb 0x41021e
push edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x3c]
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov word [eax], cx
xor ecx, ecx
mov word [eax + 2], cx
mov eax, dword [ebp - 0x44]
lea ecx, [eax*2 + 2]
mov eax, edi
mov byte [ebp - 4], 2
cmp ecx, 0x1000
jb 0x41020e
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41029f
push ecx
push edi
call fcn.0041b3bf
add esp, 8
mov byte [ebp - 4], 1
jmp 0x41023a
lea ecx, [ebp - 0x38]
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x3c]
add esp, 0xc
mov ecx, dword [ebp - 0x48]
mov word [eax], cx
xor ecx, ecx
mov word [eax + 2], cx
mov edi, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x38], edi
mov eax, dword [ebp - 0x50]
inc eax
mov dword [ebp - 0x50], eax
cmp eax, 0x10
jl 0x410100
cmp esi, 8
lea eax, [ebp - 0x38]
mov esi, dword [ebp - 0x5c]
push ecx
cmovae eax, edi
mov ecx, esi
push eax
call fcn.0040ba30
mov edx, dword [ebp - 0x24]
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x4102af
mov ecx, dword [ebp - 0x38]
lea edx, [edx*2 + 2]
mov eax, ecx
mov dword [ebp - 4], 3
cmp edx, 0x1000
jb 0x4102a5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4102a5
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041b3bf
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041b330
mov esp, ebp
pop ebp
ret
call fcn.00409ec0
int3