joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402ebb
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x402ed8
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov ebx, edi
test edi, edi
jne 0x402ee7
mov ebx, 0x40ece8
mov eax, dword [ebp + 8]
test eax, eax
js 0x402efc
mov ecx, dword [0x42fc18]
add ecx, eax
push ecx
call fcn.00402cbe
push 4
lea eax, [ebp + 0x14]
push eax
call fcn.00402c8c
test eax, eax
jne 0x402f13
push 0xfffffffffffffffd
pop eax
jmp 0x40306c
test dword [ebp + 0x14], 0x80000000
je 0x40304b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x42acf0
mov dword [ebp - 0xc], eax
call fcn.004060f4
and dword [ebp + 0x14], 0x7fffffff
mov eax, dword [ebp + 0x14]
mov dword [ebp + 8], eax
jle 0x403069
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x402f53
mov esi, dword [ebp + 0x14]
push esi
mov edi, 0x40ace8
push edi
call fcn.00402c8c
test eax, eax
je 0x402f0b
sub dword [ebp + 0x14], esi
mov dword [0x42ad08], edi
mov dword [0x42ad0c], esi
mov eax, dword [ebp - 8]
mov ecx, 0x42acf0
mov dword [0x42ad10], ebx
mov dword [0x42ad14], eax
call fcn.00406114
mov dword [ebp - 0x14], eax
test eax, eax
js 0x40303d
mov esi, dword [0x42ad10]
sub esi, ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
test byte [0x42fcb4], 1
mov edi, eax
je 0x402ff1
sub eax, dword [ebp - 0xc]
cmp eax, 0xc8
ja 0x402fbe
cmp dword [ebp + 0x14], 0
jne 0x402ff1
push dword [ebp + 8]
mov eax, dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x54]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
push 0
call fcn.00404867
mov dword [ebp - 0xc], edi
xor eax, eax
cmp esi, eax
je 0x403032
cmp dword [ebp + 0x10], eax
jne 0x40301a
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403044
cmp dword [ebp - 0x10], esi
jne 0x403044
add dword [ebp - 4], esi
jmp 0x403026
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov ebx, dword [0x42ad10]
cmp dword [ebp - 0x14], 1
jne 0x402f72
jmp 0x403069
cmp dword [ebp + 0x14], eax
jg 0x402f46
jmp 0x403069
push 0xfffffffffffffffc
jmp 0x402f0d
push 0xfffffffffffffffe
jmp 0x402f0d
test edi, edi
je 0x4030b2
cmp dword [ebp + 0x14], esi
jge 0x403057
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00402c8c
test eax, eax
je 0x402f0b
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x40307e
mov esi, dword [ebp + 0x14]
push esi
mov edi, 0x40ace8
push edi
call fcn.00402c8c
test eax, eax
je 0x402f0b
push 0
lea eax, [ebp + 0x10]
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403044
cmp esi, dword [ebp + 0x10]
jne 0x403044
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x403073
jmp 0x403069
Function at 0x4054a8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x42d1c0
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x42d1c0], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4054e3
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x40562a
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x405647
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x40564a
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea ecx, [eax + 1]
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405679
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4056bd
test edi, edi
jne 0x405684
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4056b7

Function at 0x4056c1
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405732
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x400
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405721
cmp dword [ebp + 0x14], 1
je 0x405723
cmp dword [ebp + 0x14], 2
je 0x405723
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x4059ad
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42d208
push esi
call fcn.004057d8
push esi
call fcn.004055b3
mov edi, eax
test edi, edi
jne 0x4059ce
xor eax, eax
jmp 0x405a26
push edi
call fcn.0040582e
test byte [0x42fc28], 0x80
je 0x4059e7
mov al, byte [edi]
test al, al
je 0x4059ca
cmp al, 0x5c
je 0x4059ca
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
sub edi, esi
jmp 0x405a07
push esi
call fcn.004058c9
test eax, eax
je 0x405a01
test byte [eax], 0x10
je 0x405a2b
push esi
call fcn.00405986
push esi
call ebx
cmp eax, edi
jg 0x4059f2
push esi
call fcn.00405959
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x405a25
Function at 0x405cd2
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.004058f0
mov esi, dword [esp + 0x18]
test eax, eax
je 0x405cf6
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405e2f
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x42d608], 0x4c554e
mov edi, 0x400
mov ebp, 0x42d608
test esi, esi
je 0x405d3a
push 1
push 0
push esi
call fcn.0040564a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405e35
cmp eax, edi
jg 0x405e35
push edi
mov esi, 0x42df48
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405e35
cmp eax, edi
jg 0x405e35
push esi
push ebp
push str._s_s_r_n
push 0x42da08
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x42fbcc]
push dword [eax + 0x128]
push esi
call fcn.00405a85
push 4
push 0xc0000000
push esi
call fcn.0040564a
mov ebp, eax
mov dword [esp + 0x14], ebp
cmp ebp, 0xffffffff
je 0x405e2f
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405e28
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405e28
cmp edi, dword [esp + 0x18]
jne 0x405e28
push str._Rename__r_n
push esi
call fcn.00405a2f
test eax, eax
jne 0x405e3c
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call fcn.004057d8
add edi, 0xa
mov eax, edi
push ebx
push 0x42da08
add eax, esi
push eax
call fcn.00405606
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
add edi, ebx
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x42fc90]
pop edi
pop esi
pop ebp
pop ebx
ret 8
push 0x407614
add eax, 0xa
push eax
call fcn.00405a2f
test eax, eax
je 0x405df3
inc eax
lea ecx, [esi + edi]
mov ebp, eax
cmp eax, ecx
jae 0x405e63
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405e58
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x405df5
Function at 0x405e6b
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.004059ad
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], eax
test cl, 8
je 0x405ea0
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42fc88], eax
jmp 0x406031
mov dword [ebp + 8], ecx
and dword [ebp + 8], 1
push esi
je 0x405ebb
test eax, eax
je 0x405fdc
test cl, 2
je 0x405fdc
push edi
push ebx
mov esi, 0x42e348
push esi
call fcn.004057d8
cmp dword [ebp + 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x405ede
push str..
push esi
call edi
jmp 0x405ee4
push ebx
call fcn.00405986
cmp byte [ebx], 0
jne 0x405ef2
cmp byte [0x42e348], 0x5c
jne 0x405efa
push 0x407290
push ebx
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [ebx + eax]
lea eax, [ebp - 0x148]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x405fd1
lea esi, [ebp - 0x11c]
push 0x3f
mov eax, esi
push eax
call fcn.0040556f
cmp byte [eax], 0
je 0x405f3c
cmp byte [ebp - 0x18], 0
je 0x405f3c
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x405f52
mov al, byte [esi + 1]
test al, al
je 0x405fb0
cmp al, 0x2e
jne 0x405f52
cmp byte [esi + 2], 0
je 0x405fb0
push esi
push edi
call fcn.004057d8
test byte [ebp - 0x148], 0x10
je 0x405f77
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405fb0
push dword [ebp + 0xc]
push ebx
call fcn.00405e6b
jmp 0x405fb0
push ebx
call fcn.0040562a
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405fa8
test byte [ebp + 0xc], 4
je 0x405fa0
push ebx
push 0xfffffffffffffff1
call fcn.00404867
push 0
push ebx
call fcn.00405cd2
jmp 0x405fb0
inc dword [0x42fc88]
jmp 0x405fb0
push ebx
push 0xfffffffffffffff2
call fcn.00404867
lea eax, [ebp - 0x148]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405f1e
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405fdb
mov byte [edi - 1], 0
pop edi
xor esi, esi
cmp dword [ebp + 8], esi
je 0x406030
cmp dword [ebp - 8], esi
je 0x406020
push ebx
call fcn.004058c9
test eax, eax
je 0x406030
push ebx
call fcn.00405959
push ebx
call fcn.0040562a
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x406028
test byte [ebp + 0xc], 4
je 0x406020
push ebx
push 0xfffffffffffffff1
call fcn.00404867
push esi
push ebx
call fcn.00405cd2
jmp 0x406030
inc dword [0x42fc88]
jmp 0x406030
push ebx
push 0xffffffffffffffe5
call fcn.00404867
pop esi
pop ebx
leave
ret 8
Function at 0x406036
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x42e74c], 0
jne 0x406074
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x40604a
mov dword [ecx*4 + 0x42e748], eax
inc ecx
cmp ecx, 0x100
jl 0x406045
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x4060a1
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x42e748]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x406082
not eax
pop ebp
ret 0xc

Function at 0x4060a7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
mov esi, str.zz
lea edi, [ebp - 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x10]
test edi, edi
jle 0x4060e0
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
sub esi, ecx
mov edx, dword [eax]
and edx, 7
mov dl, byte [ebp + edx - 0xc]
xor dl, byte [esi + ecx]
mov byte [ecx], dl
inc ecx
inc dword [eax]
dec edi
jne 0x4060cc
pop edi
pop esi
leave
ret
Function at 0x4016e0
Capabilities:
Enumerate processes
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0
push 2
mov dword [ebp - 0x230], 0x22c
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x230]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x401780
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Process32NextW]
lea eax, [ebp - 0x230]
push eax
push esi
call edi
test eax, eax
je 0x40177f
lea eax, [ebp - 0x20c]
push 0x466130
push eax
call fcn.0042c9d7
add esp, 8
test eax, eax
je 0x401759
lea eax, [ebp - 0x230]
push eax
push esi
call edi
test eax, eax
jne 0x401731
jmp 0x40177f
push dword [ebp - 0x228]
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x40177f
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00422009
mov esp, ebp
pop ebp
ret

Function at 0x4017e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x202c
call fcn.0043d750
mov eax, dword [0x47b014]
xor eax, esp
mov dword [esp + 0x2028], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [esp + 0x30]
push 0x2000
push 0
push eax
mov dword [esp + 0x30], str.ClipLauncher_X91.exe
mov dword [esp + 0x34], str.ClipLauncher.exe
mov dword [esp + 0x38], str.DgIpSvr.exe
mov dword [esp + 0x18], 0x6de9a59d
mov dword [esp + 0x1c], 0x4ce946a7
mov dword [esp + 0x20], 0x6df127b4
mov dword [esp + 0x24], 0x50a0a371
call fcn.00423950
add esp, 0xc
lea eax, [esp + 0x1c]
xor bl, bl
push eax
push 1
push 0
push str.SoftwarePassThruSupport.04.04Scanmatik___SM2_USB
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4018ab
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x2000
push eax
lea eax, [esp + 0x34]
push eax
push 0
push 0
push str.FunctionLibrary
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 0x1c]
test eax, eax
movzx ebx, bl
mov ecx, 1
cmove ebx, ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test bl, bl
je 0x401940
mov esi, dword [ebp + 8]
mov eax, esi
sub eax, 0
je 0x4018ee
sub eax, 1
je 0x4018e7
sub eax, 1
je 0x4018e0
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2028]
xor ecx, esp
call fcn.00422009
mov esp, ebp
pop ebp
ret 8
mov ecx, 2
jmp 0x4018f0
mov ecx, 1
jmp 0x4018f0
xor ecx, ecx
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
lea eax, [esp + 0x34]
mov edx, 0x445ca0
push eax
push 3
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x1c]
push eax
push 0x74a
call fcn.00409ae0
mov bl, al
add esp, 0x18
mov eax, dword [esp + 0x1c]
add eax, 0x3e8
mov dword [edi], eax
test bl, bl
je 0x401940
cmp esi, 1
je 0x40193b
cmp esi, 2
jne 0x401940
call fcn.004016e0
mov ecx, dword [esp + 0x2034]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00422009
mov esp, ebp
pop ebp
ret 8
Function at 0x401d10
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2004
call fcn.0043d750
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x1000
lea eax, [ebp - 0x2004]
mov edi, ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
test eax, eax
jne 0x401d77
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x401d77
push 0x1000
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
setne cl
test eax, eax
jne 0x401d77
mov al, cl
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
mov eax, edi
test edi, edi
je 0x401e3b
push esi
lea esi, [ebp - 0x2004]
mov ecx, 0x1000
sub esi, edi
nop
movzx edx, word [esi + eax]
test dx, dx
je 0x401da5
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x401d90
xor ecx, ecx
mov word [eax], cx
mov ecx, 0x1000
cmp word [edi], 0
mov eax, edi
je 0x401dce
test ecx, ecx
je 0x401def
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x401db7
test ecx, ecx
je 0x401def
cmp ecx, 1
jbe 0x401dea
mov esi, 0x4664b4
sub esi, eax
movzx edx, word [esi + eax]
test dx, dx
je 0x401dea
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x401dd5
xor ecx, ecx
mov word [eax], cx
cmp word [edi], 0
mov ecx, 0x1000
mov eax, edi
je 0x401e17
nop dword [eax]
test ecx, ecx
je 0x401e3a
add eax, 2
dec ecx
cmp word [eax], 0
jne 0x401e00
test ecx, ecx
je 0x401e3a
cmp ecx, 1
jbe 0x401e35
mov esi, str.SM2RP32.DLL
sub esi, eax
nop
movzx edx, word [esi + eax]
test dx, dx
je 0x401e35
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x401e20
xor ecx, ecx
mov word [eax], cx
pop esi
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ecx, dword [ebp - 4]
test eax, eax
pop edi
setne al
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
Function at 0x401e60
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x600c
call fcn.0043d750
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x600c]
mov edi, edx
push eax
push 1
push 0
push str.SoftwarePassThruSupport.04.04Scanmatik___SM2_USB
push closesocket
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401fa2
lea eax, [ebp - 0x6008]
mov dword [ebp - 0x6008], 0x2000
push eax
lea eax, [ebp - 0x2004]
push eax
push 0
push 0
push str.FunctionLibrary
push dword [ebp - 0x600c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x600c]
test eax, eax
jne 0x401f9c
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0
push 0
push 0
push 0x1000
lea eax, [ebp - 0x6004]
push eax
push 0x1000
lea eax, [ebp - 0x4004]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.0043178f
add esp, 0x24
mov eax, esi
test esi, esi
je 0x401f8a
cmp edi, 1
jb 0x401f8a
mov ecx, edi
jbe 0x401f46
push ebx
lea ebx, [ebp - 0x4004]
sub ebx, esi
nop dword [eax + eax]
movzx edx, word [ebx + eax]
test dx, dx
je 0x401f45
mov word [eax], dx
dec ecx
add eax, 2
cmp ecx, 1
ja 0x401f30
pop ebx
xor ecx, ecx
mov word [eax], cx
cmp word [esi], cx
je 0x401f61
test edi, edi
je 0x401f8a
add esi, 2
dec edi
cmp word [esi], cx
jne 0x401f50
test edi, edi
je 0x401f8a
cmp edi, 1
jbe 0x401f85
lea ecx, [ebp - 0x6004]
sub ecx, esi
nop
movzx eax, word [ecx + esi]
test ax, ax
je 0x401f85
mov word [esi], ax
dec edi
add esi, 2
cmp edi, 1
ja 0x401f70
xor eax, eax
mov word [esi], ax
pop edi
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor al, al
pop edi
xor ecx, ebp
pop esi
call fcn.00422009
mov esp, ebp
pop ebp
ret
Function at 0x403ba0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
test dl, dl
je 0x403bd3
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x403bd3
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
call fcn.004016e0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test eax, eax
je 0x403bee
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push edi
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403c14
mov ebx, 9
jmp 0x403c60
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x3e00
push 0x446438
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403c5b
cmp dword [ebp - 8], 0x3e00
jne 0x403c5b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
pop edi
mov eax, ebx
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422009
mov esp, ebp
pop ebp
ret
mov ebx, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.00422009
mov esp, ebp
pop ebp
ret
Function at 0x404520
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x202c
call fcn.0043d750
mov eax, dword [0x47b014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x2024]
xor esi, esi
push eax
push 1
push esi
push str.SoftwarePassThruSupport.04.04Scanmatik___SM2_USB
mov edi, ecx
mov ebx, edx
push closesocket
mov dword [ebp - 0x2028], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40462f
lea eax, [ebp - 0x200c]
mov dword [ebp - 0x200c], 0x2000
push eax
lea eax, [ebp - 0x2008]
push eax
push esi
push esi
push str.FunctionLibrary
push dword [ebp - 0x2024]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x2024]
test eax, eax
jne 0x404629
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, edi
call fcn.00405330
mov edx, ebx
mov dword [ebp - method.DynamicArray_class_DEVICE_INFORMATION_WRAPPER__unsigned_int_.virtual_0], vtable.DynamicArray_class_DEVICE_INFORMATION_WRAPPER__unsigned_int_.0
lea ecx, [ebp - 0x2020]
mov dword [ebp - 0x201c], esi
mov dword [ebp - 0x2018], esi
mov dword [eax + 0x14], esi
mov dword [ebp - 0x2014], 1
mov dword [ebp - 0x2010], esi
call fcn.00403fa0
mov ebx, dword [ebp - 0x2018]
mov eax, dword [ebp - 0x2010]
test ebx, ebx
je 0x40461e
mov esi, dword [ebp - 0x2028]
mov edi, eax
nop dword [eax]
push edi
mov ecx, esi
call fcn.004052a0
add edi, 0x18
sub ebx, 1
jne 0x404600
mov edi, dword [ebp - 0x2028]
xor esi, esi
mov eax, dword [ebp - 0x2010]
push eax
call fcn.00430bb8
add esp, 4
jmp 0x404634
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 1
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x404651
mov eax, dword [edi + 0x10]
mov edx, 4
test byte [eax], 0xe
lea eax, [eax + 0x18]
cmovne esi, edx
sub ecx, 1
jne 0x404643
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422009
mov esp, ebp
pop ebp
ret