Function at 0x40a510
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x420a21
mov eax, dword fs:[0]
push eax
sub esp, 0x478
mov eax, dword [0x433fbc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x60]
mov ecx, 0x4342d0
mov dword [ebp - 0x428], eax
mov edi, 6
lea eax, [ebp - 0x428]
push eax
call fcn.004025d0
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x440], 0
mov eax, dword [eax + 0x48]
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x454], 0
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x44c], 0
mov dword [ebp - 0x43c], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x434], 0
movaps xmm0, xmmword [0x427160]
lea eax, [ebp - 0x484]
push 0x400
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x420]
push 0x55
push eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x46c], 0x1088
mov dword [ebp - 0x464], 0x18
mov byte [ebp - 0x421], 0
movups xmmword [ebp - 0x20], xmm0
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x20]
mov dword [ebp - 0x470], 4
mov dword [ebp - 0x480], eax
add esp, 0xc
mov eax, dword [esi + 0xec]
mov dword [ebp - 0x47c], eax
lea eax, [ebp - 0x420]
mov dword [ebp - 0x478], eax
mov eax, dword [esi + 0xf0]
mov dword [ebp - 0x474], eax
mov eax, dword [ebp - 0x428]
push eax
lea ecx, [eax + 0x30]
mov dword [ebp - 0x458], ecx
mov dword [ebp - 0x42c], ecx
lea ecx, [eax + 0x10]
mov dword [ebp - 0x45c], ecx
mov dword [ebp - 0x430], ecx
lea ecx, [ebp - 0x448]
call fcn.0040a4a0
push dword [ebp - 0x42c]
lea ecx, [ebp - 0x454]
call fcn.0040a4a0
push dword [ebp - 0x430]
lea ecx, [ebp - 0x43c]
call fcn.0040a4a0
mov eax, dword [ebp - 0x428]
xor ecx, ecx
mov edx, dword [ebp - 0x448]
test eax, eax
je 0x40a6b8
nop
mov byte [edx + ecx], cl
inc ecx
cmp ecx, eax
jb 0x40a6b0
mov al, byte [0x4342c8]
test al, al
jne 0x40a92c
cmp byte [esi + 0xb1], 0
jne 0x40a6f2
nop
push 1
call fcn.00401170
add esp, 4
cmp byte [0x4342c8], 0
jne 0x40a92c
cmp byte [esi + 0xb1], 0
je 0x40a6d0
jmp 0x40a6fa
test al, al
jne 0x40a92c
cmp byte [esi + 0x6c], 0
jne 0x40a709
cmp byte [ebp - 0x421], 0
jne 0x40a76e
mov eax, dword [ebp - 0x458]
push dword [esi + 0x2c]
mov dword [ebp - 0x42c], eax
lea eax, [ebp - 0x46c]
push eax
push dword [esi + 0x64]
call sub.cryptoki.dll_C_EncryptInit
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40a908
lea eax, [ebp - 0x42c]
push eax
push dword [ebp - 0x454]
push dword [ebp - 0x428]
push dword [ebp - 0x448]
push dword [esi + 0x64]
call sub.cryptoki.dll_C_Encrypt
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x40a8f6
mov eax, dword [ebp - 0x470]
sub dword [ebp - 0x42c], eax
cmp byte [esi + 0x6d], 0
mov byte [ebp - 0x421], 1
je 0x40a827
mov eax, dword [ebp - 0x45c]
push dword [esi + 0x2c]
mov dword [ebp - 0x430], eax
lea eax, [ebp - 0x46c]
push eax
push dword [esi + 0x64]
call sub.cryptoki.dll_C_DecryptInit
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40a8e4
lea eax, [ebp - 0x430]
push eax
push dword [ebp - 0x43c]
push dword [ebp - 0x42c]
push dword [ebp - 0x454]
push dword [esi + 0x64]
call sub.cryptoki.dll_C_Decrypt
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x40a8d2
cmp byte [esi + 0x51], al
je 0x40a827
mov ecx, dword [ebp - 0x430]
mov eax, dword [ebp - 0x428]
cmp ecx, eax
jne 0x40a8b3
xor edx, edx
test eax, eax
je 0x40a827
mov eax, dword [ebp - 0x448]
mov ecx, dword [ebp - 0x43c]
sub eax, ecx
mov dword [ebp - 0x460], eax
nop dword [eax + eax]
mov al, byte [eax + ecx]
cmp al, byte [ecx]
jne 0x40a87c
mov eax, dword [ebp - 0x460]
inc edx
inc ecx
cmp edx, dword [ebp - 0x428]
jb 0x40a810
mov edx, dword [ebp - 0x428]
sub esp, 8
mov eax, edx
shr eax, 0x1f
movd xmm0, edx
cvtdq2pd xmm0, xmm0
mov dword [esp + 4], 0x3f800000
addsd xmm0, qword [eax*8 + 0x427150]
cvtpd2ps xmm0, xmm0
mulss xmm0, dword [0x427128]
movss dword [esp], xmm0
push dword [esi + 0x54]
call fcn.00415cd0
mov al, byte [0x4342c8]
add esp, 0xc
test al, al
je 0x40a6c5
jmp 0x40a92c
mov eax, dword [ebp - 0x43c]
movzx eax, byte [eax + edx]
push eax
mov eax, dword [ebp - 0x448]
movzx eax, byte [eax + edx]
push eax
push edx
push str._nDecrypted_data_doesnt_match_source_data__byte__lu__source__02x__result__02x__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
add esp, 0x14
mov edi, 0x20
jmp 0x40a92c
push eax
push ecx
push str._nDecrypted_data_length__lu_doesnt_match_source_data_length__lu_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
mov edi, 0x21
jmp 0x40a929
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_Decrypt_n
jmp 0x40a918
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_DecryptInit_n
jmp 0x40a918
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_Encrypt_n
jmp 0x40a918
push edi
call fcn.0041e470
add esp, 4
push eax
push edi
push str._nError__08lx___s__on_C_EncryptInit_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004148f0
add esp, 0x10
mov dword [esi + 0x24], edi
mov esi, dword [ebp - 0x43c]
test esi, esi
je 0x40a965
mov ecx, dword [ebp - 0x434]
mov eax, esi
sub ecx, esi
cmp ecx, 0x1000
jb 0x40a95b
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a9c7
push ecx
push esi
call fcn.0041e5a7
add esp, 8
mov edx, dword [ebp - 0x454]
test edx, edx
je 0x40a99b
mov ecx, dword [ebp - 0x44c]
mov eax, edx
sub ecx, edx
cmp ecx, 0x1000
jb 0x40a991
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a9c7
push ecx
push edx
call fcn.0041e5a7
add esp, 8
mov ecx, dword [ebp - 0x448]
test ecx, ecx
je 0x40a9d7
mov edx, dword [ebp - 0x440]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x40a9cd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40a9cd
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0041e5a7
add esp, 8
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.0041e5b5
mov esp, ebp
pop ebp
ret