Function at 0x40d718
Capabilities:
Authenticate hmac
Check os version
Encode data using base64
Encrypt data using speck
Get number of processors
Resolve function by parsing pe exports

Disassembly:
add dword [ebp - 0x58], 0xffffffa9
mov word [ebp - 0x5c], 0xa9f
cmp dword [ebp - 0x28], 0
je 0x406cdc
jne 0x406d05
push dword [ebp + 0x24]
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x20]
push 0
pop dword [ebp - 0x54]
and esi, eax
lea edi, [eax + 0xe25]
mov eax, dword [ebp - 0x68]
lea eax, [eax + 4]
push eax
push dword [ebp - 0x54]
call fcn.0040456b
cmp dword [ebp - 0x3c], 0x7a
jne 0x406d11
push eax
call 0x40a40a
add esp, 0x10
test eax, eax
je 0x406d00
mov eax, 0x41a4d0
push 0x6c6c642e
pop dword [ebp - 0x54]
add dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x68]
lea eax, [eax + 8]
push eax
push dword [ebp - 0x54]
call fcn.0040456b
cmp dword [ebp - 0x3c], 0x7a
jne 0x406d39
xor dword [ebp - 0x1c], 0xffffff97
mov edx, dword [ebp - 0x50]
lea ebx, [edx + 0x520]
mov dword [ebp - 0x20], ebx
xor edx, dword [ebp - 0x1c]
cmp dword [ebp - 0x3c], 0xffffff86
jne 0x40d2f0
call fcn.0040a232
add esp, 0x10
pop ebp
mov edi, edi
push dword [ebp - 0x20]
add edi, dword [ebp - 0x6c]
or eax, dword [ebp - 0x48]
or dword [ebp - 0x2c], esi
mov edx, dword [ebp - 0x68]
cmp dword [ebp - 0x3c], 0x400002
jne 0x40d310
lea esp, [ebp - 0x18]
pop edi
pop esi
mov edi, dword [ebp - 0x50]
add edi, 0x5c0
call dword [edi]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
cmp dword [ebp - 0x3c], 1
je 0x40d32b
push ebx
push 1
cmp dword [ebp - 0x3c], 1
je 0x40d340
je 0x40d2ed
push 0x41a285
mov esi, dword [ebp - 0x20]
and ecx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x50]
lea esi, [ebx + 0x4d0]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x6c], eax
xor dword [ebp - 0x58], ebx
push dword [ebp - 0x20]
cmp dword [ebp - 0x28], 0
je 0x40d372
push eax
call fcn.0040b3ce
mov edi, eax
movzx eax, byte [esi]
lea ecx, [ebp - 0x10]
mov edi, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x44]
cmp dword [ebp - 0x28], 0xfffffff0
jne 0x40d398
mov dword [ebp - 0x222c], 2
mov ebx, dword [ebp - 0x222c]
mov ecx, dword [ebp - 0x221c]
push edi
mov esi, dword [ebp - 0x50]
lea edi, [esi + 0xe78]
mov dword [ebp - 0x20], edi
cmp dword [ebp - 0x28], 0x59
jne 0x40d3bf
call fcn.00404fe7
push eax
mov dword [ebp - 4], 0
call fcn.00408a77
push dword [ebp - 0x20]
or esi, dword [ebp - 0x2c]
and dword [ebp - 0x5c], 0xa77
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x50]
lea ebx, [eax + 0xdec]
mov dword [ebp - 0x20], ebx
xor edi, dword [ebp - 0x2c]
cmp dword [ebp - 0x3c], 1
je 0x40d3f7
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
mov ecx, 0x41a1a9
push dword [ebp - 0x20]
xor ebx, dword [ebp - 0x2c]
or dword [ebp - 0x2c], 0x8e8
push dword [ebp - 0x50]
call fcn.0040f5f0
and ebx, esi
sub edx, dword [ebp - 0x1c]
cmp dword [ebp - 0x20], 0xfffffffe
jne 0x40d439
or edi, esi
sub edi, dword [ebp - 0x38]
xor esi, dword [ebp - 0x2c]
cmp dword [ebp - 0x20], 0xffffffff
je 0x40d449
add word [ebp - 0x2c], 0xeef
mov ecx, dword [ebp - 0x50]
or dword [ecx + 4], 8
or esi, ecx
add esi, 0x4345
mov ebx, dword [ebp - 0x20]
add edx, dword [ebp - 0x6c]
and dword [ebp - 0x44], 0xc
mov edx, dword [ebp - 0x50]
cmp dword [ebp - 0x28], 0xffffffab
jne 0x40d46d
nop
invalid
lea ebx, [edx + 0x520]
mov dword [ebp - 0x20], ebx
xor word [ebp - 0x34], 0x408
add dword [ebp - 0x28], 0
je 0x40d48d
jb 0x40d4f4
mov ecx, dword [edx]
test edi, edi
jne 0x40d476
and eax, dword [ebp - 0x38]
and dword [ebp - 0x38], edi
push dword [ebp - 0x20]
add ebx, edx
mov word [ebp - 0x6c], 0x1cb
cmp dword [ebp - 0x3c], 0xffffffd5
jne 0x40d4aa
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x50]
xor eax, esi
and dword [ebp - 0x2c], 0xbc4
lea esi, [ecx + 0x4d0]
mov dword [ebp - 0x20], esi
test dword [ebp - 0x28], 0
je 0x40d4d7
push eax
call fcn.00414983
neg eax
pop ecx
or eax, dword [ebp - 0x48]
add edi, 0xdcb6
push dword [ebp - 0x20]
cmp dword [ebp - 0x3c], 0xffffff86
jne 0x40d501
call fcn.004160e3
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
call fcn.0040ebd8
add eax, ebx
push 0x10
cmp dword [ebp - 0x28], 0xffffffcc
jne 0x40d51a
push eax
sub esp, 0x20
and edi, dword [ebp - 0x5c]
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x50]
mov edx, edi
lea edi, [ebx + 0x520]
mov dword [ebp - 0x20], edi
sub eax, dword [ebp - 0x48]
cmp dword [ebp - 0x3c], 0x400002
jne 0x40d540
lea ecx, [ebp - 0x70]
cmp dword [ebp - 0x3c], 0x400002
jne 0x40d54f
cmp eax, 0x64
push dword [ebp - 0x20]
and edi, ebx
call fcn.0040f555
or eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x50]
or edi, dword [ebp - 0x44]
xor dword [ebp - 0x34], edx
lea ecx, [ebx + 0x530]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x3c], 0x400002
jne 0x40d582
push dword [ebp - 0x20]
and esi, ebx
add edi, ebx
push 0x10
mov ebx, dword [ebp - 0x20]
and dword [ebp - 0x1c], 0x38
mov ecx, dword [ebp - 0x50]
xor edi, dword [ebp - 0x34]
lea ebx, [ecx + 0x520]
mov dword [ebp - 0x20], ebx
xor ecx, dword [ebp - 0x2c]
and word [ebp - 0x38], 0x5dc
push dword [ebp - 0x20]
sub eax, ebx
call fcn.0040ef96
cmp dword [ebp - 0x3c], 1
je 0x40d5c3
int3
sub edx, edi
and dword [ebp - 0x34], ebx
push dword [ebp - 0x50]
or eax, dword [ebp - 0x2c]
call fcn.0040e229
cmp dword [ebp - 0x28], 0x4b
jne 0x40d5e5
je 0x40d5dc
cmp dword [0x41a577], 0
mov esi, dword [ebp - 0x30]
lea esi, [esi - 0x30]
push esi
push dword [ebp - 0x20]
call fcn.0040456b
xor esi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
xor edi, ecx
mov eax, dword [ebp - 0x50]
xor esi, dword [ebp - 0x64]
lea edx, [eax + 0x530]
mov dword [ebp - 0x20], edx
add ecx, dword [ebp - 0x64]
xor word [ebp - 0x58], 0xe53
add dword [ebp - 0x28], 0
je 0x40d625
mov eax, dword [ebp - 8]
lea ecx, [eax + 0x10]
push dword [ecx]
push dword [ebp - 0x20]
mov esi, dword [ebp - 0x30]
cmp dword [ebp - 0x3c], 0x400002
jne 0x40d63c
add esp, 4
mov dword [edi], ebx
push dword [esi - 0x30]
call fcn.004126b9
mov edx, dword [ebp - 0x30]
lea ecx, [esi + edi*2 + 0x16d2]
push dword [edx - 0x30]
lea ecx, [ebx]
mov ecx, eax
cmp dword [ebp - 0x3c], 0x22
jne 0x40d667
jne 0x40d623
mov ecx, dword [esi]
call fcn.0040bde2
mov edi, dword [ebp - 0x20]
or ebx, esi
mov ebx, dword [ebp - 0x30]
lea edi, [ebx - 0x24]
mov dword [ebp - 0x20], edi
and edx, edi
sub ebx, esi
mov ebx, eax
test dword [ebp - 0x28], 0
je 0x40d68b
push dword [ebp - 0x20]
cmp dword [ebp - 0x3c], 0x21
jne 0x40d6a2
test esi, esi
setg dl
lea esi, [edx + edx - 1]
test esi, esi
xor word [ebp - 0x48], 0x3a2
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x64], esi
cmp dword [ebp - 0x3c], 1
je 0x40d6ba
and dword [eax], 0
mov edx, dword [ebp - 0x50]
add edx, 0x5b0
call dword [edx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x20]
and esi, dword [ebp - 0x48]
sub ebx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x30]
lea eax, [ecx - 0x24]
mov dword [ebp - 0x20], eax
add dword [ebp - 0x28], 0
je 0x40d6eb
pop edi
pop esi
pop ebx
mov esp, ebp
push dword [ebp - 0x20]
and word [ebp - 0x58], 0xa93
sub eax, esi
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x30]
and dword [ebp - 0x38], ebx
cmp dword [ebp - 0x28], 0xffffffcf
jne 0x40d709
push ecx
lea esi, [edi - 0x1c]
mov dword [ebp - 0x20], esi
cmp dword [ebp - 0x3c], 0x24
jne 0x40d71b
dec ecx
je 0x40d775
add dword [ebp - 0x28], 0
je 0x40d72b
call fcn.0040f71e
add byte [eax - 0x51], al
inc ecx
mov edx, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x50]
add ecx, 0x610
call dword [ecx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
cmp dword [ebp - 0x3c], 0xffffffaa
jne 0x40e817
shr ecx, 1
or ecx, edx
dec eax
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], ecx
add esp, 0x10
sub edx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x30]
push dword [edi - 0x34]
xor ebx, dword [ebp - 0x6c]
sub ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x30]
and ebx, dword [ebp - 0x44]
push dword [edi - 0x28]
call fcn.004126b9
mov ecx, dword [ebp - 0x30]
mov esi, ecx
mov byte [ebp - 0x5c], 0x84
push dword [ecx - 0x28]
xor dword [ebp - 0x58], edi
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x30]
or eax, dword [ebp - 0x5c]
lea edx, [ebx - 0x24]
mov dword [ebp - 0x20], edx
add esi, ecx
push dword [ebp - 0x20]
sub ebx, dword [ebp - 0x64]
mov word [ebp - 0x38], 0x883
mov edx, dword [ebp - 0x68]
xor ebx, dword [ebp - 0x34]
or dword [ebp - 0x58], eax
mov ebx, dword [ebp - 0x50]
add ebx, 0x5b0
call dword [ebx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
lea esi, [eax + 0x1cdd]
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x30]
add eax, dword [ebp - 0x44]
xor dword [ebp - 0x2c], 0xa18
lea ebx, [edi - 0x24]
mov dword [ebp - 0x20], ebx
add eax, ecx
mov eax, esi
cmp dword [ebp - 0x3c], 0x400002
jne 0x40e8b3
movzx ecx, byte [ebp - 3]
shl eax, 8
push dword [ebp - 0x20]
or dword [ebp - 0x34], edi
add ecx, edi
xor dword [ebp - 0x2c], 0xc
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x30]
mov eax, esi
mov eax, 0x4e3adb67
mov eax, edi
sub edi, dword [ebp - 0x58]
lea esi, [ebx - 0x1c]
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x64], 0x4f
push dword [ebp - 0x20]
call fcn.004133b7
xor word [ebp - 0x2c], 0xc0d
push 0
xor esi, edi
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x30]
cmp dword [ebp - 0x28], 0x400002
jne 0x40e90c
push ecx
push eax
call 0x40dc88
add esp, 0x10
lea edx, [esi - 0x1c]
mov dword [ebp - 0x20], edx
and edx, dword [ebp - 0x48]
add dword [ebp - 0x28], 0
je 0x40e92b
push dword [ebp - 0x20]
xor dword [ebp - 0x58], 0x925
push 0x1f0001
mov edx, dword [ebp - 0x20]
add ebx, dword [ebp - 0x5c]
xor edi, ecx
mov ebx, dword [ebp - 0x30]
lea edx, [ebx - 4]
mov dword [ebp - 0x20], edx
add esi, 0x2b28
push dword [ebp - 0x20]
add dword [ebp - 0x58], ecx
xor esi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x68]
add dword [ebp - 0x2c], ebx
add dword [ebp - 0x34], edx
mov ebx, dword [ebp - 0x50]
add ebx, 0x638
call dword [ebx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
xor ebx, eax
mov byte [ebp - 0x44], 0xcd
cmp dword [ebp - 0x20], 0x40000000
je 0x40e9b2
xor edx, dword [ebp - 0x58]
sub edi, dword [ebp - 0x34]
test dword [ebp - 0x28], 0
je 0x40e9a2
int3
cmp dword [ebp - 0x20], 0xc0000035
jne 0x40e9d7
cmp dword [ebp - 0x28], 0xffffffa0
jne 0x40e9c7
lea esi, [edx + edx - 1]
test esi, esi
jne 0x40d2c9
mov edi, dword [ebp - 0x30]
add dword [ebp - 0x2c], esi
mov dword [edi - 0x38], 1
sub esi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x30]
cmp dword [ebp - 0x3c], 1
je 0x40ea01
mov dword [ebp - 0x1abc], ecx
jne 0x417b70
mov ebx, dword [ebp - 0x1acc]
cmp dword [ebp + 0x10], ecx
jbe 0x406cbc
mov dword [esi - 0x2c], 0
or dword [ebp - 0x58], ecx
add ebx, dword [ebp - 0x5c]
push 0x8000
cmp dword [ebp - 0x3c], 0x7b
jne 0x40ea21
jb 0x40ea2a
add dword [ebp - 0x28], 0
je 0x40ea2d
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 0x20]
and dword [ebp - 0x44], eax
mov ebx, dword [ebp - 0x30]
lea edi, [ebx - 0x2c]
mov dword [ebp - 0x20], edi
and dword [ebp - 0x38], edi
and ebx, dword [ebp - 0x44]
add dword [ebp - 0x48], 0x2b3
or edi, dword [ebp - 0x5c]
push dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
mov word [ebp - 0x5c], 0xa06
lea edx, [ecx - 0x28]
mov dword [ebp - 0x20], edx
cmp dword [ebp - 0x28], 0x400002
jne 0x40ea76
mov byte [eax + edi], 0
pop edi
mov eax, esi
pop esi
pop ebx
push dword [ebp - 0x20]
cmp dword [ebp - 0x3c], 1
je 0x40ea8f
mov eax, dword fs:[0]
push eax
sub esp, 0x41a185
sub edx, edi
push 0xffffffff
and edi, eax
and dword [ebp - 0x2c], edx
xor edi, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x68]
or ebx, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x50]
add ebx, 0x5a4
call dword [ebx]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
and edi, dword [ebp - 0x64]
cmp dword [ebp - 0x3c], 0x400002
jne 0x40ead5
mov edi, dword [ebp + 0xc]
mov dword [ebp - 8], eax
cmp dword [esi + 0x54], ecx
je 0x417abf
mov ecx, esi
mov edx, dword [ebp - 0x30]
mov dword [edx - 0x30], 0
cmp dword [ebp - 0x3c], 1
je 0x40eafb
lea ecx, [ebp + 0x14]
lea ecx, [ebp - 0x178]
mov edx, dword [esp + 8]
lea eax, [edx + 0xc]
push 0x8000
or word [ebp - 0x5c], 0xf6d
mov edx, dword [ebp - 0x20]
cmp dword [ebp - 0x3c], 1
je 0x40eb1a
sete dl
pop esi
mov eax, edx
pop ebp
push ebp
mov eax, dword [ebp - 0x30]
xor esi, dword [ebp - 0x48]
add dword [ebp - 0x64], ecx
lea edx, [eax - 0x30]
mov dword [ebp - 0x20], edx
and ecx, dword [ebp - 0x64]
and dword [ebp - 0x64], edi
push dword [ebp - 0x20]
test dword [ebp - 0x28], 0
je 0x40eb49
mov dword [ebx + 8], 0
pop ebx
pop ebp
int3
or eax, dword [ebp - 0x48]
xor ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x20]
xor dword [ebp - 0x38], 0xe82
or dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x30]
or dword [ebp - 0x38], esi
lea eax, [ecx - 0x34]
mov dword [ebp - 0x20], eax
push dword [ebp - 0x20]
or dword [ebp - 0x1c], ecx
xor edx, dword [ebp - 0x38]
push 0xffffffff
mov edx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x34]
add ebx, esi
mov edi, dword [ebp - 0x50]
add edi, 0x5a4
call dword [edi]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x68], edx
add ecx, 0x7b35
add eax, dword [ebp - 0x2c]
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x30]
push dword [eax - 0x38]
call fcn.0040456b
xor dword [ebp - 0x48], ecx
pop dword [ebp - 0x50]
add edx, 0x6089
mov edi, dword [ebp - 0x30]
or dword [ebp - 0x48], edi
mov esp, edi
pop dword [ebp - 0x30]
add dword [ebp - 0x28], 0
je 0x40ebcd
mov eax, edi
pop edi
pop esi
xor ecx, ebp
sub esi, edx
ret 4
or word [ebp - 0x34], 0xd46
ret 0xc