Function at 0x40e4e1
Capabilities:
Create new key via cryptacquirecontext
Read file on windows
Resume thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x362c
call fcn.00510000
push esi
push edi
and dword [ebp - 4], 0
mov eax, dword [0x582948]
mov dword [ebp - 0x2c], eax
mov eax, dword [0x58292c]
mov dword [ebp - 0x41c], eax
and dword [ebp - 0x50], 0
mov dword [ebp - 0x410], 0x3c
and dword [ebp - 0x5c], 0
mov eax, dword [0x582964]
mov dword [ebp - 0xcc], eax
mov eax, dword [0x582960]
inc eax
mov dword [ebp - 0x194], eax
mov eax, dword [0x57c2b8]
add eax, dword [0x582944]
mov dword [ebp - 0x58], eax
mov eax, dword [0x582928]
sub eax, dword [0x58292c]
mov dword [ebp - 0x5b0], eax
mov eax, dword [0x58293c]
mov dword [ebp - 0x604], eax
lea eax, [ebp - 0x658]
push eax
push dword [ebp - 0x604]
call dword [sym.imp.USER32.dll_BeginPaint]
mov dword [ebp - 0x660], eax
lea eax, [ebp - 0x614]
push eax
push dword [ebp - 0x604]
call dword [sym.imp.USER32.dll_GetClientRect]
push dword [ebp - 0x660]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov dword [ebp - 0x664], eax
push 0x3c
push 0x50
push dword [ebp - 0x660]
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov dword [ebp - 0x680], eax
push dword [ebp - 0x680]
push dword [ebp - 0x664]
call dword [sym.imp.GDI32.dll_SelectObject]
and dword [ebp - 0x67c], 0
jmp 0x40e5d6
mov eax, dword [ebp - 0x67c]
inc eax
mov dword [ebp - 0x67c], eax
mov eax, dword [0x582964]
add eax, 0x14
cmp dword [ebp - 0x67c], eax
jge 0x40e62f
and dword [ebp - 0x65c], 0
jmp 0x40e5fc
mov eax, dword [ebp - 0x65c]
inc eax
mov dword [ebp - 0x65c], eax
push 0xa
pop eax
sub eax, dword [0x582934]
cmp dword [ebp - 0x65c], eax
jge 0x40e62d
push dword [0x58292c]
push dword [ebp - 0x65c]
push dword [ebp - 0x67c]
push dword [ebp - 0x664]
call dword [sym.imp.GDI32.dll_SetPixelV]
jmp 0x40e5ef
jmp 0x40e5c9
push 0xcc0020
push 0x3c
push 0x50
push 0
push 0
push dword [ebp - 0x664]
push dword [ebp - 0x608]
push dword [ebp - 0x60c]
push 0
push 0
push dword [ebp - 0x660]
call dword [sym.imp.GDI32.dll_StretchBlt]
push dword [0x58294c]
push dword [ebp - 0x664]
call dword [sym.imp.GDI32.dll_RestoreDC]
push dword [ebp - 0x664]
call dword [sym.imp.GDI32.dll_DeleteDC]
lea eax, [ebp - 0x658]
push eax
push dword [ebp - 0x604]
call dword [sym.imp.USER32.dll_EndPaint]
and dword [ebp - 0x688], 0
je 0x40e6ad
push dword [ebp - 0x688]
call dword [sym.imp.USER32.dll_SetCursor]
and dword [ebp - 0x688], 0
jmp 0x40e6b9
push dword [ebp - 0x68c]
call dword [sym.imp.USER32.dll_SetCursor]
push 0x7f02
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x684], eax
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x68c], eax
mov eax, dword [0x582964]
mov dword [ebp - 0x690], eax
or dword [ebp - 0x6e4], 0xffffffff
mov dword [ebp - 0x6e0], 0x1c
mov dword [ebp - 0x6dc], 0x1c200
mov eax, dword [ebp - 0x6d8]
or eax, 1
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffffffd
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffffffb
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffffff7
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xffffffcf
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xffffffbf
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xffffff7f
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffffeff
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffffdff
mov dword [ebp - 0x6d8], eax
mov byte [ebp - 0x6c9], 0
mov eax, dword [ebp - 0x6d8]
and eax, 0xfffff7ff
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xffffcfff
mov dword [ebp - 0x6d8], eax
mov eax, dword [ebp - 0x6d8]
and eax, 0xffffbfff
mov dword [ebp - 0x6d8], eax
mov byte [ebp - 0x6ce], 8
mov byte [ebp - 0x6cd], 0
mov byte [ebp - 0x6cc], 0
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push str.COM2:
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x6e4], eax
push 0x2800
push 0x2800
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_SetupComm]
test eax, eax
jne 0x40e83c
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push str.ser_open__:_cant_set_buffers_n_r
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
pop ecx
pop ecx
lea eax, [ebp - 0x6e0]
push eax
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_SetCommState]
test eax, eax
jne 0x40e87d
push str.ser_open__:_cant_set_com_state0_n_r
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
pop ecx
pop ecx
cmp dword [0x582964], 0
je 0x40e87d
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x6b4]
push eax
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_GetCommTimeouts]
test eax, eax
jne 0x40e8be
push 0x5385fc
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
pop ecx
pop ecx
cmp dword [0x582964], 0
je 0x40e8be
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
or dword [ebp - 0x6b4], 0xffffffff
and dword [ebp - 0x6b0], 0
and dword [ebp - 0x6ac], 0
mov dword [ebp - 0x6a8], 0xa
mov dword [ebp - 0x6a4], 0x3e8
lea eax, [ebp - 0x6b4]
push eax
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_SetCommTimeouts]
test eax, eax
jne 0x40e928
push str.GetCommTimeouts_error_n_r
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
pop ecx
pop ecx
cmp dword [0x582964], 0
je 0x40e928
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push str.ser_open__:_cant_set_initial_timeout_n_r
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
pop ecx
pop ecx
cmp dword [ebp - 0x6e4], 0xffffffff
jne 0x40e95d
push str.error__n
call fcn.0050ff40
pop ecx
cmp dword [0x582934], 0
jne 0x40e978
cmp dword [0x58293c], 0
jne 0x40e978
cmp dword [0x582938], 0
jne 0x40e9ed
xor eax, eax
inc eax
je 0x40e9ed
push 0
lea eax, [ebp - 0x6a0]
push eax
push 4
lea eax, [ebp - 0x2ee8]
push eax
push dword [ebp - 0x6e4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x40e9eb
push 0
push 0
lea eax, [ebp - 0x2eec]
push eax
push 0x400
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.DLL_FormatMessageA]
push dword [ebp - 0x2eec]
push str.ser_recv__:_read_error:__s_n
call fcn.0051048f
add eax, 0x40
push eax
call fcn.00510383
add esp, 0xc
push dword [ebp - 0x2eec]
call dword [sym.imp.KERNEL32.DLL_LocalFree]
jmp 0x40e978
mov dword [ebp - 0x2f00], str.ThermalView
mov dword [ebp - 0x2f08], 8
mov dword [ebp - 0x2f04], 0xff
lea eax, [ebp - 0x2f08]
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov dword [ebp - 0x2f5c], 0x30
and dword [ebp - 0x2f58], 0
and dword [ebp - 0x2f50], 0
and dword [ebp - 0x2f4c], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2f48], eax
push 0x8000
push 0
push 0
push 1
movzx eax, word [0x58294c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [ebp - 0x2f44], eax
push 0x8000
push 0
push 0
push 2
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [ebp - 0x2f40], eax
mov dword [ebp - 0x2f3c], 0x10
movzx eax, word [0x582938]
mov dword [ebp - 0x2f38], eax
mov eax, dword [ebp - 0x2f00]
mov dword [ebp - 0x2f34], eax
push 0x8000
push 0x10
push 0x10
push 1
movzx eax, word [0x58292c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadImageA]
mov dword [ebp - 0x2f30], eax
push 2
push dword [0x582964]
call dword [sym.imp.KERNEL32.DLL_SetThreadPriority]
push dword [0x582964]
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
movzx eax, word [0x58294c]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
mov dword [ebp - 0x2f28], eax
push 0
push 0x409a3c
push 0
push 0x582250
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov eax, dword [0x58293c]
mov dword [ebp - 0x2ef0], eax
mov eax, dword [0x582964]
mov dword [ebp - 0x2ef8], eax
mov eax, dword [0x58294c]
mov dword [ebp - 0x2efc], eax
mov eax, dword [0x582928]
mov dword [ebp - 0x2ef4], eax
mov eax, dword [ebp - 0x2ef8]
mov dword [ebp - 0x3628], eax
cmp dword [ebp - 0x3628], 0x110
je 0x40ebb2
cmp dword [ebp - 0x3628], 0x111
je 0x40eb6d
jmp 0x40ebb9
mov eax, dword [ebp - 0x2efc]
and eax, 0xffff
movzx eax, ax
mov dword [ebp - 0x362c], eax
cmp dword [ebp - 0x362c], 0
jle 0x40ebb0
cmp dword [ebp - 0x362c], 2
jle 0x40eb95
jmp 0x40ebb0
mov eax, dword [ebp - 0x2efc]
and eax, 0xffff
movzx eax, ax
push eax
push dword [ebp - 0x2ef0]
call dword [sym.imp.USER32.dll_EndDialog]
jmp 0x40ebb9
and dword [0x582964], 0
mov eax, dword [0x582948]
mov dword [ebp - 0x2f84], eax
mov eax, dword [0x58292c]
mov dword [ebp - 0x336c], eax
and dword [ebp - 0x2fa8], 0
mov dword [ebp - 0x3360], 0x3c
and dword [ebp - 0x2fb4], 0
mov eax, dword [0x582964]
mov dword [ebp - 0x3024], eax
mov eax, dword [0x582960]
inc eax
mov dword [ebp - 0x30e4], eax
mov eax, dword [0x57c2b8]
add eax, dword [0x582944]
mov dword [ebp - 0x2fb0], eax
mov eax, dword [0x582928]
sub eax, dword [0x58292c]
mov dword [ebp - 0x3510], eax
mov esi, 0x5387f8
lea edi, [ebp - 0x3580]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x5387e8
lea edi, [ebp - 0x3570]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
and dword [ebp - 0x359c], 0
mov byte [ebp - 0x359d], 0
mov byte [ebp - 0x3585], 0
fld qword [0x5387e0]
fstp qword [ebp - 0x3590]
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
and dword [ebp - 0x3598], 0
lea eax, [ebp - 0x3598]
push eax
push 0x5387e8
push 1
push 0
push 0x5387f8
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x359c], eax
and dword [ebp - 0x3594], 0
cmp dword [0x58293c], 0
je 0x40ecf1
lea eax, [ebp - 0x3594]
push eax
push 1
push 0
mov eax, dword [ebp - 0x3598]
mov eax, dword [eax]
push dword [ebp - 0x3598]
call dword [eax + 0x10]
mov dword [ebp - 0x359c], eax
mov eax, dword [ebp - 0x3598]
mov eax, dword [eax]
push dword [ebp - 0x3598]
call dword [eax + 8]
and dword [ebp - 0x3598], 0
mov eax, dword [ebp - 0x3594]
mov eax, dword [eax]
push dword [ebp - 0x3594]
call dword [eax + 8]
and dword [ebp - 0x3594], 0
fld dword [0x5387d8]
fstp dword [ebp - 0x3584]
call dword [sym.imp.ole32.dll_CoUninitialize]
cmp dword [0x582934], 0
je 0x40ee28
mov esi, 0x5387f8
lea edi, [ebp - 0x35c0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, 0x5387e8
lea edi, [ebp - 0x35b0]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
and dword [ebp - 0x35dc], 0
and dword [ebp - 0x35c4], 0
and dword [ebp - 0x35d8], 0
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
lea eax, [ebp - 0x35dc]
push eax
lea eax, [ebp - 0x35b0]
push eax
push 1
push 0
lea eax, [ebp - 0x35c0]
push eax
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov dword [ebp - 0x35e4], eax
lea eax, [ebp - 0x35c4]
push eax
push 0
push 1
mov eax, dword [ebp - 0x35dc]
mov eax, dword [eax]
push dword [ebp - 0x35dc]
call dword [eax + 0x10]
mov dword [ebp - 0x35e4], eax
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
cmp dword [ebp - 0x35cc], 0
je 0x40ed94
mov eax, dword [ebp - 0x35d0]
and eax, dword [0x58294c]
jne 0x40ed94
mov eax, dword [ebp - 0x35d8]
movzx eax, word [eax + 2]
cmp eax, 2
jne 0x40ee28
mov eax, dword [ebp - 0x35d8]
movzx eax, word [eax + 0xe]
cmp eax, 0x20
jne 0x40ee28
and dword [ebp - 0x35d4], 0
jmp 0x40ede8
mov eax, dword [ebp - 0x35d4]
inc eax
inc eax
mov dword [ebp - 0x35d4], eax
mov eax, dword [ebp - 0x35d4]
cmp eax, dword [ebp - 0x35e0]
jae 0x40ee28
mov eax, dword [ebp - 0x35d4]
mov ecx, dword [ebp - 0x35c8]
movzx eax, word [ecx + eax*2 + 2]
push eax
mov eax, dword [ebp - 0x35d4]
mov ecx, dword [ebp - 0x35c8]
movzx eax, word [ecx + eax*2]
push eax
push str._15u__15u_n
call fcn.0050ff40
add esp, 0xc
jmp 0x40edda
mov eax, dword [0x582934]
add eax, 4
mov dword [ebp - 0x35f8], eax
mov dword [ebp - 0x35f0], 0x582250
mov dword [ebp - 0x35f4], 0x582928
mov eax, dword [ebp - 0x35f0]
and dword [eax], 0
mov eax, dword [ebp - 0x35f4]
and dword [eax], 0
cmp dword [0x582934], 0
je 0x40ee92
lea eax, [ebp - 0x35fc]
push eax
push 0
push 0
push dword [ebp - 0x35f8]
push 0
push dword [ebp - 0x35ec]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x40ee92
mov eax, dword [0x582938]
mov dword [0x58292c], eax
mov eax, dword [0x582938]
add eax, 0x400
push eax
call fcn.0050fca8
pop ecx
mov ecx, dword [ebp - 0x35f0]
mov dword [ecx], eax
mov eax, dword [ebp - 0x35f0]
cmp dword [eax], 0
je 0x40eec0
mov eax, dword [0x58294c]
mov dword [0x582928], eax
cmp dword [0x582934], 0
je 0x40ef19
lea eax, [ebp - 0x35fc]
push eax
mov eax, dword [ebp - 0x35f0]
push dword [eax]
push 0
push dword [ebp - 0x35f8]
push 0
push dword [ebp - 0x35ec]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
je 0x40ef02
mov eax, dword [ebp - 0x35f4]
mov ecx, dword [ebp - 0x35fc]
mov dword [eax], ecx
jmp 0x40ef19
mov eax, dword [ebp - 0x35f0]
push dword [eax]
call fcn.00510349
pop ecx
mov eax, dword [ebp - 0x35f0]
and dword [eax], 0
mov byte [ebp - 0x3610], 8
mov byte [ebp - 0x360f], 2
mov byte [ebp - 0x360e], 0
mov byte [ebp - 0x360d], 0
mov byte [ebp - 0x360c], 1
mov byte [ebp - 0x360b], 0x66
mov byte [ebp - 0x360a], 0
mov byte [ebp - 0x3609], 0
mov byte [ebp - 0x3608], 8
mov byte [ebp - 0x3607], 0
mov byte [ebp - 0x3606], 0
mov byte [ebp - 0x3605], 0
mov byte [ebp - 0x3604], 0xf1
mov byte [ebp - 0x3603], 0xe
mov byte [ebp - 0x3602], 0x25
mov byte [ebp - 0x3601], 0x7c
mov byte [ebp - 0x3600], 0x6b
mov byte [ebp - 0x35ff], 0xce
mov byte [ebp - 0x35fe], 0xd
mov byte [ebp - 0x35fd], 0x34
and dword [ebp - 0x3620], 0
and dword [ebp - 0x361c], 0
push 0xf0000000
push 1
push 0x538690
push 0
lea eax, [ebp - 0x3620]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40f014
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x80090016
jne 0x40f014
push 0xf0000008
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push str.container
lea eax, [ebp - 0x3620]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x40f014
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Error_in_AcquireContext_0x_08x__n
call fcn.0050ff40
pop ecx
pop ecx
lea eax, [ebp - 0x361c]
push eax
push 1
push 0
push 0x14
lea eax, [ebp - 0x3610]
push eax
push dword [ebp - 0x3620]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x40f049
call dword [sym.imp.KERNEL32.DLL_GetLastError]
add eax, dword [0x582928]
mov dword [0x582928], eax
cmp dword [0x58293c], 0
je 0x40f085
lea eax, [ebp - 0x3618]
push eax
push 0
push 0
push 8
push 0
push dword [ebp - 0x361c]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f085
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [0x58292c]
sub ecx, eax
mov dword [0x58292c], ecx
push 0x400
call fcn.0050fca8
pop ecx
mov dword [ebp - 0x3624], eax
cmp dword [ebp - 0x3624], 0
je 0x40f0a9
mov dword [0x58292c], 1
cmp dword [0x582934], 0
je 0x40f0e0
lea eax, [ebp - 0x3618]
push eax
push dword [ebp - 0x3624]
push 0
push 8
push 0
push dword [ebp - 0x361c]
call dword [sym.imp.ADVAPI32.dll_CryptExportKey]
test eax, eax
jne 0x40f0e0
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [0x58292c], eax
and dword [ebp - 0x3614], 0
and dword [ebp - 0x3614], 0
mov eax, dword [0x582934]
add eax, 4
cmp dword [ebp - 0x3614], eax
jae 0x40f10d
mov eax, dword [ebp - 0x3614]
inc eax
mov dword [ebp - 0x3614], eax
jmp 0x40f0ee
cmp dword [ebp - 0x3624], 0
je 0x40f122
push dword [ebp - 0x3624]
call fcn.00510349
pop ecx
cmp dword [ebp - 0x3620], 0
je 0x40f139
push 0
push dword [ebp - 0x3620]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push 0
push dword [0x58269c]
push 0
push dword [0x582948]
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.GDI32.dll_EnumFontsA]
mov eax, dword [0x582964]
cmp eax, dword [0x58294c]
jle 0x40f174
mov eax, dword [0x582964]
mov eax, dword [eax*4 + 0x5826d0]
mov dword [0x5826a0], eax
xor eax, eax
pop edi
pop esi
leave
ret