Function at 0x4019f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x45fda8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, ecx
lea eax, [esp + 0x18]
lea ecx, [esp + 0xc]
push eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x1c]
xor ebx, ebx
push edx
push eax
push ebx
push ebx
push ebx
push ebx
push 1
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.004022b0
mov eax, dword [esp + 0x30]
add esp, 0x24
cmp eax, ebx
je 0x401a7c
push ebx
push ebx
push str.Failed_initializing_
call sub.MFC42.DLL_AfxMessageBox
cmp dword [esp + 0xc], 0xfffffff3
jne 0x401a68
push ebx
push ebx
push str.Old_HASP_driver_found___please_update_driver_to_actual_version._n
call sub.MFC42.DLL_AfxMessageBox
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
lea ecx, [esp + 0x18]
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x6d64
push 0x1741
push ebx
push 0xf34
push 5
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.004022b0
mov eax, dword [esp + 0x30]
add esp, 0x24
cmp eax, ebx
jne 0x401ae2
push ebx
push ebx
push str.The_requested_HASP_key_was_not_found_
call sub.MFC42.DLL_AfxMessageBox
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
lea edx, [esp + 0x18]
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
push 0x6d64
push 0x1741
push ebx
push 0xf34
push 6
call fcn.004022b0
mov eax, dword [esp + 0x30]
add esp, 0x24
cmp eax, ebx
je 0x401b38
push ebx
push ebx
push str.Failed_reading_key_serial_number_
call sub.MFC42.DLL_AfxMessageBox
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
shl esi, 0x10
push ecx
or esi, ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push str.M1734226215
call sub.MFC42.DLL_CString::CString_1
mov ecx, edi
call fcn.004021b0
cmp esi, eax
je 0x401b81
push ebx
push ebx
push str.Key_does_not_match_expected_serial_number_
call sub.MFC42.DLL_AfxMessageBox
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
lea eax, [esp + 0x1c]
mov ecx, edi
push eax
call fcn.00402000
mov esi, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x2c], ebx
sub esi, 0x46e6d4
mov dl, 0x20
cmp eax, str.000_001_146_238_103_104_116_055_060_089_152_222_106_019_115_188_158_136_178_012_059_091_065_092_041_169_028_246_090_088_172_120_234_197_231_188_050_148_222_224_224_246_079_083_026_110_239_049_142_182_141_089_139_042_038_093_240_053_033_017_057_162_244_165_084_090_058_078_142_205_106_167_041_127_017_131_139_185_061_147_120_171_185_138_048_228_063_235_170_029_142_094_001_090_159_183_234_218_220_019_185_191_118_155_205_196_124_241_120_045_089_014_162_042_245_099_079_061_057_197_049_145_178_177_093_238_217_131_099_036_221_104_059_155_094_022_067_143_190_051_163_073_006_207_181_086_207_117_072_114_117_133_134_112_087_122_229_104_092_064_133_066_126_127_035_222_163_000_142_052_229_081_147_007_213_244_044_145_220_120_228_161_120_025_115_107_247_171_147_127_089_104_037_102_197_030_209_023_224_097_019_216_180_229_175_044_043_197_014_101_202_105_098_050_021_123_225_160_171_124_171_125_016_255_069_227_151_013_064_144_177_143_118_073_043_060_074_174_187_002_069_099_195_223_235_136_169_212_115_113_240_248_041_023_061_208_005_176_087_044_012_113_130_167_112_144_167_069_183_167_041_197_140_237_076_211_138_059_192_093_149_143_084_057_036_074_162_071_002_184_226_103_011_153_154_021_147_130_164_233_196_050_015_111_129_070_032_032_032_032_032_032_032_032_032_032
jl 0x401bae
mov byte [eax + 0x46e6d4], dl
jmp 0x401bbb
mov cl, byte [esi + eax + 0x46e6d4]
mov byte [eax + 0x46e6d4], cl
inc eax
cmp eax, 0x70
jl 0x401b9f
lea ecx, [esp + 0x18]
lea edx, [esp + 0xc]
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0x6d64
push 0x1741
push ebx
mov esi, 0x38
push 0xf34
push 0x33
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], 0x46e6d4
call fcn.004022b0
mov eax, dword [esp + 0x30]
add esp, 0x24
cmp eax, ebx
je 0x401c3d
push ebx
push ebx
push str.Failed_writing_to_key_
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov ecx, 0x1c
xor eax, eax
mov edi, 0x46e744
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push edx
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
push 0x6d64
push 0x1741
push ebx
push 0xf34
push 0x32
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x3c], 0x46e744
call fcn.004022b0
mov eax, dword [esp + 0x30]
add esp, 0x24
cmp eax, ebx
je 0x401cc6
push ebx
push ebx
push str.Failed_reading_hasp_
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov ecx, 0x1c
mov edi, 0x46e744
mov esi, 0x46e6d4
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
push ebx
push ebx
je 0x401d0c
push str.Failed_in_key_write_validation_
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
push str.Key_updated_
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x24
ret