joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d7db7
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x52de80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004c8a05
mov dword [ebp - 0x14], eax
cmp dword [0x55a378], esi
jne 0x4d7eaa
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4d7e37
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x4d7f8a
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x4d7f8a
push 0x506f3c
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4d7f8a
push eax
call ebx
push 0x506f48
push edi
mov dword [0x55a378], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x55a37c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x55a380], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x55a388], eax
test eax, eax
je 0x4d7ea7
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x55a384], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x4d7ecf
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x4d7ec2
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x4d7ee4
push 4
pop eax
jmp 0x4d7f8c
cmp dword [ebp - 0x14], esi
je 0x4d7ee4
push dword [0x55a378]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x4d7ec9
mov eax, dword [0x55a384]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x4d7f42
cmp dword [0x55a388], edi
je 0x4d7f42
push eax
call ebx
push dword [0x55a388]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x4d7f42
test eax, eax
je 0x4d7f42
call ecx
test eax, eax
je 0x4d7f37
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x4d7f37
test byte [ebp - 8], 1
jne 0x4d7f42
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x4d7f72
mov eax, dword [0x55a37c]
cmp eax, edi
je 0x4d7f6f
push eax
call ebx
test eax, eax
je 0x4d7f6f
call eax
mov esi, eax
test esi, esi
je 0x4d7f6f
mov eax, dword [0x55a380]
cmp eax, edi
je 0x4d7f6f
push eax
call ebx
test eax, eax
je 0x4d7f6f
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x55a378]
call ebx
test eax, eax
je 0x4d7f8a
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x4d7f8c
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc11d
mov esp, ebp
pop ebp
ret
Function at 0x4e8304
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 0xc]
mov eax, 0x1505
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 0x8c]
add ebx, ecx
cmp esi, 0x102
jae 0x4e8414
test esi, esi
je 0x4e8414
xor edx, edx
mov dword [ebp - 4], edx
test esi, esi
je 0x4e8355
mov edi, edx
movzx ecx, byte [edi + ebx]
imul eax, eax, 0x21
add eax, ecx
inc edi
cmp edi, esi
jb 0x4e8341
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
and eax, 0xff
mov ebx, dword [edi + eax*4 + 0xb4]
mov dword [edi + eax*4 + 0xb4], ecx
mov dword [edi + 0x4c8], edx
test ebx, ebx
je 0x4e8414
sub ecx, ebx
cmp ecx, esi
jbe 0x4e8414
mov eax, dword [edi + 0x80]
sub eax, 0x106
cmp ecx, eax
jae 0x4e8414
cmp esi, dword [edi + 0x4cc]
ja 0x4e8414
test esi, esi
je 0x4e83ea
mov ecx, dword [ebp + 0xc]
mov edx, ebx
mov eax, dword [edi + 0x8c]
add eax, ecx
sub edx, ecx
mov dword [ebp + 8], edx
mov edx, dword [ebp - 4]
mov dword [ebp + 0xc], eax
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov al, byte [eax]
cmp al, byte [esi + ecx]
mov esi, dword [ebp + 0x10]
jne 0x4e8414
lea eax, [ebx + edx]
push eax
push edi
call fcn.004e8220
pop ecx
pop ecx
cmp eax, 1
jne 0x4e8414
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
inc edx
inc eax
mov dword [ebp - 4], edx
mov dword [ebp + 0xc], eax
cmp edx, esi
jb 0x4e83b7
mov eax, dword [edi + 0x8c]
lea ecx, [ebx + esi]
cmp byte [ecx + eax - 1], 0x3b
je 0x4e840a
lea eax, [ebx + esi]
push eax
push edi
call fcn.004e8220
pop ecx
pop ecx
test eax, eax
jne 0x4e8414
mov dword [edi + 0x4c8], ebx
mov eax, esi
jmp 0x4e8416
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4e9061
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 0
jne 0x4e906e
xor eax, eax
pop ebp
ret
pop ebp
jmp fcn.004e90cd
Function at 0x401000
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1120
call fcn.0042b680
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp byte [eax], 0
mov ebx, ecx
mov dword [ebp - 4], edi
je 0x401032
push eax
push str.Create__DI_file___s_
push dword [ebp + 0xc]
call fcn.0041e63d
add esp, 0xc
jmp 0x401041
push str.Create__DI_data
push dword [ebp + 0xc]
call fcn.0041e63d
pop ecx
pop ecx
mov esi, 0x115
lea eax, [ebp - 0x120]
push esi
push edi
push eax
call fcn.0042b620
push 4
lea eax, [ebp - 0x120]
push str.LFDI
push eax
call fcn.0042b2e0
lea eax, [ebp - 0x118]
push str.LFDITEC.DLL
push eax
call fcn.0042b1f0
push 0x16
lea eax, [ebp - 0x100]
push 0x445048
push eax
call fcn.0042b2e0
movzx ax, byte [ebp + 0x10]
mov word [ebp - 0x11a], ax
mov al, byte [0x452f0e]
shl al, 2
or al, byte [0x452f0c]
push 0xff
mov dword [ebp - 0x108], 0x100
shl al, 1
or al, byte [0x452f0a]
mov byte [ebp - 0xe0], al
lea eax, [ebp - 0x120]
push eax
call fcn.0040e839
add esp, 0x34
neg al
mov byte [ebp - 0x21], al
mov eax, dword [ebx + 0x3c8c]
lea ecx, [eax + 0x552]
mov dl, byte [ecx - 2]
mov byte [ebp + edi - 0x1f], dl
mov dl, byte [ecx]
mov byte [ebp + edi - 0x15], dl
inc edi
add ecx, 4
cmp edi, 0xa
jb 0x4010e2
mov edi, dword [ebp + 0xc]
mov al, byte [eax + 0x578]
mov ecx, edi
mov byte [ebp - 0x20], al
call fcn.0041eaa4
push str.AT_DI_file_contents_...
push edi
call fcn.0041e63d
pop ecx
lea eax, [ebp - 0x120]
pop ecx
push esi
push eax
mov ecx, edi
call fcn.0041e766
mov ecx, edi
call fcn.0041eaaf
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp byte [eax], bl
jne 0x40115d
lea eax, [ebp - 0x120]
push esi
push eax
push 0x454c68
call fcn.0042b2e0
add esp, 0xc
mov word [0x454c66], 1
xor ax, ax
jmp 0x401240
push ebx
push ebx
push 2
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x10], eax
jne 0x4011c4
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x1120]
push 0x1000
push eax
call esi
push eax
call fcn.00424a92
add esp, 0xc
push eax
push str.Cant_create__DI_file____s
push edi
call fcn.0041e63d
add esp, 0xc
call esi
test eax, 0xffffff80
je 0x4011b7
mov eax, 0x8030
jmp 0x401240
xor ecx, ecx
mov ch, al
or cx, 0x8030
mov eax, ecx
jmp 0x401240
lea ecx, [ebp - 8]
push ebx
push ecx
lea ecx, [ebp - 0x120]
push esi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40120a
push str.Error_writing__DI_file_data
push edi
call fcn.0041e63d
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, 0xffffff80
je 0x4011fd
mov esi, 0x803c
jmp 0x401226
xor ecx, ecx
mov ch, al
or cx, 0x803c
mov esi, ecx
jmp 0x401226
cmp dword [ebp - 8], esi
je 0x401223
push str.Failed_to_write__DI_file_data___disk_full_
push edi
call fcn.0041e63d
pop ecx
mov esi, 0x803d
pop ecx
jmp 0x401226
mov esi, dword [ebp - 4]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp si, bx
je 0x40123d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ax, si
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x401346
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push esi
push edi
mov esi, ecx
call dword [sym.imp.WINMM.dll_timeGetTime]
xor edi, edi
mov dword [ebp - 8], eax
cmp eax, edi
jne 0x401369
mov dword [ebp - 8], 1
push edi
push edi
push 1
push edi
mov dword [esi + 0x1360], edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, edi
mov dword [esi + 0x135c], eax
jne 0x40138d
mov ax, 1
jmp 0x4014eb
push ebx
mov eax, dword [esi + 0x1360]
xor ebx, ebx
cmp eax, ebx
je 0x4013a4
and word [eax + 0x56], 0xfffe
mov eax, dword [eax]
jmp 0x401396
cmp byte [0x452004], 0
je 0x4013be
push 0x452004
mov ecx, esi
call fcn.004014ef
mov dword [ebp - 4], eax
jmp 0x401436
lea eax, [esi + 0x1249]
push eax
lea eax, [ebp - 0x268]
push eax
call fcn.0042b1f0
lea eax, [ebp - 0x268]
push 0x43812c
push eax
call fcn.0042b200
add esp, 0x10
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x268]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
mov dword [ebp - 4], ebx
cmp edi, 0xffffffff
je 0x401436
test byte [ebp - 0x14c], 0x10
jne 0x40141d
lea eax, [ebp - 0x120]
mov ecx, esi
push eax
call fcn.004014ef
or dword [ebp - 4], eax
lea eax, [ebp - 0x14c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401403
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esi + 0x1360]
mov dword [ebp - 0xc], ebx
test eax, eax
je 0x401479
mov cx, word [eax + 0x56]
mov edi, dword [eax]
test cl, 1
je 0x40145e
test cl, 4
mov ebx, eax
jne 0x401473
mov dword [ebp - 0xc], 1
jmp 0x401473
test ebx, ebx
je 0x401466
mov dword [ebx], edi
jmp 0x40146c
mov dword [esi + 0x1360], edi
push eax
call fcn.0042b6af
pop ecx
test edi, edi
mov eax, edi
jne 0x401443
cmp word [ebp - 4], 0
jne 0x4014c1
cmp word [ebp - 0xc], 0
je 0x4014d1
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x452024], 0
je 0x40138e
call dword [sym.imp.WINMM.dll_timeGetTime]
test eax, eax
jne 0x4014a9
push 1
pop eax
mov ecx, dword [0x452024]
sub eax, dword [ebp - 8]
imul ecx, ecx, 0x3e8
cmp eax, ecx
ja 0x4014ca
jmp 0x40138e
mov dword [ebp - 4], 1
jmp 0x4014d1
mov dword [ebp - 4], 2
push dword [esi + 0x135c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop ebx
test ax, ax
jne 0x4014eb
mov eax, 0xffff
pop edi
pop esi
leave
ret
Function at 0x4014ef
Capabilities:
Check if file exists
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2b8
push ebx
mov ebx, ecx
push esi
push edi
lea eax, [ebx + 0x1249]
xor esi, esi
push eax
lea eax, [ebp - 0x2b8]
push eax
mov dword [ebp - 4], esi
call fcn.0042b1f0
push dword [ebp + 8]
lea eax, [ebp - 0x2b8]
push eax
call fcn.0042b200
add esp, 0x10
lea eax, [ebp - 0x2b8]
push esi
push esi
push 3
push esi
push esi
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40155c
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 2
setne cl
mov ax, cx
jmp 0x401620
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebp - 0x5c]
push 0x50
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], esi
je 0x40161c
mov eax, dword [ebp - 8]
cmp eax, esi
je 0x40161c
and byte [ebp + eax - 0x5c], 0
mov edi, dword [ebx + 0x1360]
cmp edi, esi
je 0x4015bf
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.0042b8e0
pop ecx
test eax, eax
pop ecx
je 0x4015b2
mov edi, dword [edi]
jmp 0x401597
or byte [edi + 0x56], 1
lea esi, [edi + 0x56]
test edi, edi
jne 0x4015f2
xor esi, esi
push 0x58
call fcn.0042b798
mov edi, eax
pop ecx
cmp edi, esi
je 0x40161c
lea eax, [ebp - 0x5c]
push eax
lea eax, [edi + 4]
push eax
call fcn.0042b1f0
lea esi, [edi + 0x56]
pop ecx
pop ecx
mov word [esi], 1
mov eax, dword [ebx + 0x1360]
mov dword [edi], eax
mov dword [ebx + 0x1360], edi
test byte [esi], 2
jne 0x401617
lea eax, [ebp - 0x5c]
mov ecx, ebx
push eax
call fcn.00401627
test ax, ax
jne 0x40160c
or byte [esi], 2
jmp 0x401620
cmp ax, 2
jne 0x401620
or byte [esi], 6
jmp 0x401620
mov eax, dword [ebp - 4]
jmp 0x401620
mov ax, 1
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x401627
Capabilities:
Check if file exists
Read pipe
Write pipe

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1798
call fcn.0042b680
push ebx
push esi
push edi
mov esi, ecx
call dword [sym.imp.WINMM.dll_timeGetTime]
test eax, eax
mov dword [ebp - 8], eax
jne 0x40164d
mov dword [ebp - 8], 1
cmp word [esi + 0x104c], 0
mov dword [ebp - 4], 1
jne 0x401666
xor ax, ax
jmp 0x4017ce
lea eax, [ebp - 0x94]
push str..pipeWIL.C232.Pipe.
push eax
call fcn.0042b1f0
push dword [ebp + 8]
lea eax, [ebp - 0x94]
push eax
call fcn.0042b200
push 0x14
lea eax, [ebp - 0x24]
push 0
push eax
call fcn.0042b620
mov eax, dword [esi + 0x135c]
add esp, 0x1c
mov dword [ebp - 0x14], eax
mov ebx, 0x3e8
call dword [sym.imp.WINMM.dll_timeGetTime]
test eax, eax
jne 0x4016b1
push 1
pop eax
sub eax, dword [ebp - 8]
cmp eax, ebx
jae 0x40170f
mov ecx, ebx
sub ecx, eax
cmp ecx, 0x32
ja 0x4016c4
push 0x32
pop ecx
lea eax, [ebp - 0x94]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
jne 0x4016e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40170f
jmp 0x4016a4
push dword [esi + 0x1178]
lea eax, [ebp - 0x94]
push 0x40000000
push 3
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401718
jmp 0x4016a4
mov ax, 1
jmp 0x4017ce
xor ebx, ebx
lea eax, [ebp - 0x10]
push ebx
push ebx
push eax
push edi
mov dword [ebp - 0x10], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
push dword [esi + 0x135c]
mov word [ebp - 0x1798], 4
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x1b0]
push 0x119
push eax
lea eax, [ebp - 0x1798]
push 0x15e6
push eax
push edi
call dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
test eax, eax
jne 0x4017a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4017a4
push 0xffffffffffffffff
push dword [esi + 0x135c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4017a4
lea eax, [ebp - 0xc]
push ebx
push eax
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4017a4
mov dword [ebp - 4], ebx
push edi
call dword [sym.imp.KERNEL32.dll_CancelIo]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp word [ebp - 4], bx
jne 0x4017ca
cmp word [ebp - 0x1b0], 0x104
je 0x4017ca
mov dword [ebp - 4], 2
mov ax, word [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40694c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
push ebx
push edi
mov edi, ecx
xor ebx, ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov ax, word [edi + 6]
mov dword [ebp - 8], ebx
test al, 6
je 0x406975
mov ax, 1
jmp 0x406b62
test al, 0x20
je 0x406985
mov ax, word [edi + 0x358]
jmp 0x406b62
mov al, byte [ecx]
test al, al
je 0x406995
inc ecx
cmp al, 0x5c
jne 0x406985
mov dword [ebp + 8], ecx
jmp 0x406985
mov eax, dword [ebp + 8]
cmp byte [eax], 0
jne 0x4069a5
xor ax, ax
jmp 0x406b62
push 2
push ebx
push ebx
push 0x435bfc
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x406b48
lea eax, [ebp - 0x30]
push esi
push eax
push ebx
push dword [ebp - 4]
mov dword [ebp - 0x30], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x406b37
jmp 0x4069e2
xor ebx, ebx
push 0x20019
push 1
push ebx
lea eax, [ebp - 0x30]
push 1
push eax
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
cmp esi, 0xffffffff
je 0x406a4e
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x52
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 0x43a904
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push esi
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x406a4e
push dword [ebp + 8]
lea eax, [ebp - 0x84]
push eax
call fcn.004348e0
neg eax
sbb eax, eax
pop ecx
inc eax
pop ecx
test ax, ax
mov dword [ebp - 8], eax
jne 0x406a6e
inc dword [ebp - 0xc]
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4069e0
jmp 0x406b37
push 0
lea eax, [ebp - 0xd8]
push 0x52
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x30]
push 4
push eax
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x406ae6
push 6
lea eax, [ebp - 0xd8]
push str.SERIAL
push eax
call fcn.00434ad0
add esp, 0xc
neg eax
sbb eax, eax
neg eax
mov word [edi + 0x306], ax
test ax, ax
mov eax, 0x4383dc
jne 0x406ac2
mov eax, str.serial
push eax
lea eax, [ebp - 0xd8]
push eax
lea eax, [ebp - 0x84]
push eax
push str.COMMS:_Port___s__exists__service_name____s___port_is__s
push dword [edi + 0x2b0]
call fcn.0041e63d
add esp, 0x14
jmp 0x406b00
lea eax, [ebp - 0x84]
push eax
push str.COMMS:_Failed_to_read_service_name_for_port___s_
push dword [edi + 0x2b0]
call fcn.0041e63d
add esp, 0xc
cmp word [ebp + 0xc], 0
je 0x406b37
lea eax, [ebp - 0x30]
mov ecx, edi
push eax
lea eax, [ebp - 0x84]
push dword [ebp - 4]
push eax
call fcn.004062de
test ax, ax
je 0x406b37
push str.COMMS:_Failed_to_re_start_device
push dword [edi + 0x2b0]
call fcn.0041e63d
and dword [ebp - 8], 0
pop ecx
pop ecx
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
cmp word [ebp - 8], 0
pop esi
jne 0x406b5e
push dword [ebp + 8]
push str.COMMS:_Port___s__does_not_exist
push dword [edi + 0x2b0]
call fcn.0041e63d
add esp, 0xc
mov ax, word [ebp - 8]
pop edi
pop ebx
leave
ret 8
Function at 0x407f9f
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
lea eax, [ebp - 0x25c]
add ecx, 0x9c
push eax
push ecx
push dword [ebp + 8]
call fcn.00407697
add esp, 0xc
cmp byte [0x452e8a], 0
jne 0x407fea
lea eax, [ebp - 0x25c]
push eax
push str.Port_name_must_be_specified_in__PORT__parameter_in_defaults_file__s
push dword [ebp + 0xc]
call fcn.0042b964
add esp, 0xc
mov ax, 1
jmp 0x40807e
cmp word [0x452d12], 0xffff
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push edi
mov edi, 0x800
jne 0x408031
lea eax, [ebp + 8]
push 4
push eax
push 0x22
push edi
mov word [0x452d12], 1
call esi
test eax, eax
je 0x408031
mov al, byte [ebp + 8]
cmp al, 0x30
jb 0x408031
cmp al, 0x32
ja 0x408031
and al, 0xf
movzx ax, al
mov word [0x452d12], ax
cmp word [0x452d14], 0xffff
jne 0x40806b
lea eax, [ebp + 8]
push 4
push eax
push 0x23
push edi
mov word [0x452d14], 1
call esi
test eax, eax
je 0x40806b
mov al, byte [ebp + 8]
cmp al, 0x30
jb 0x40806b
cmp al, 0x31
ja 0x40806b
and al, 0xf
movzx ax, al
mov word [0x452d14], ax
push 0x64
pop eax
pop edi
sub eax, dword [0x452cb0]
pop esi
mov dword [0x452cb0], eax
xor ax, ax
leave
ret 8
Function at 0x40838d
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
push ebx
push esi
mov ebx, 0x452004
push edi
push ebx
push str.SoftwareWordcraft_International_LtdUnimessageClass2
lea eax, [ebp - 0xd0]
push str._s_s
push eax
call fcn.0042b964
add esp, 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xd0]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40847d
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, 0x440a28
push 4
push dword [edi + 4]
push 4
push 0
push dword [edi]
push dword [ebp - 4]
call esi
add edi, 8
cmp edi, str._r_n_r_n
jb 0x4083e1
and dword [ebp - 8], 0
mov edi, 0x4409f8
push dword [ebp - 8]
lea eax, [ebp - 0xd0]
push str.ColumnWidth_u
push eax
call fcn.0042b964
add esp, 0xc
lea eax, [ebp - 0xd0]
push 4
push edi
push 4
push 0
push eax
push dword [ebp - 4]
call esi
inc dword [ebp - 8]
add edi, 4
cmp edi, 0x440a08
jb 0x408405
push dword [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
lea eax, [ebp - 4]
push eax
push str.SoftwareWordcraft_International_LtdUnimessageClass2
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40847d
push ebx
call fcn.0042bfb0
pop ecx
inc eax
push eax
push ebx
push 1
push 0
push str.DeviceName
push dword [ebp - 4]
call esi
push dword [ebp - 4]
call edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409f8c
Capabilities:
Log keystrokes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
push edi
lea eax, [esi + 0x498]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor edx, edx
mov dword [ebp - 4], eax
cmp word [ebp + 0xc], dx
je 0x40a014
mov ecx, dword [esi + 0xf4c]
cmp ecx, edx
je 0x409fc4
mov dword [ebp + 8], ecx
mov ebx, dword [ebp + 8]
cmp ebx, eax
je 0x40a072
lea edx, [esi + 0x1184]
push 6
xor ecx, ecx
mov edi, edx
pop eax
cmp dword [edi], ebx
je 0x409fe8
inc ecx
add edi, 8
cmp ecx, eax
jb 0x409fdc
cmp ecx, eax
jne 0x40a001
xor ecx, ecx
cmp dword [edx], 0
je 0x409ffb
inc ecx
add edx, 8
cmp ecx, eax
jb 0x409fee
cmp ecx, eax
jne 0x40a001
xor ecx, ecx
mov eax, dword [ebp - 4]
mov dword [esi + ecx*8 + 0x1184], ebx
mov dword [esi + ecx*8 + 0x1188], eax
jmp 0x40a06c
mov ebx, dword [ebp + 8]
lea ecx, [esi + 0x1184]
xor eax, eax
mov dword [ebp + 0xc], edx
mov edi, ecx
cmp dword [edi], ebx
je 0x40a033
inc edx
add edi, 8
cmp edx, 6
jb 0x40a024
jmp 0x40a042
mov eax, dword [esi + edx*8 + 0x1188]
and dword [esi + edx*8 + 0x1184], 0
mov edx, dword [ebp + 0xc]
push 6
pop esi
cmp dword [ecx], 0
je 0x40a057
cmp dword [ecx + 4], ebx
jne 0x40a057
mov dword [ecx + 4], eax
mov edx, dword [ecx]
add ecx, 8
dec esi
jne 0x40a048
cmp ebx, dword [ebp - 4]
jne 0x40a072
test edx, edx
mov dword [ebp + 8], edx
jne 0x40a06c
mov dword [ebp + 8], eax
cmp dword [ebp + 8], 0
jne 0x40a07d
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x40a0d0
push 0
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push dword [ebp - 8]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.USER32.dll_AttachThreadInput]
cmp edi, ebx
je 0x40a0ab
push 1
push edi
push ebx
call esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_BringWindowToTop]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetFocus]
cmp edi, ebx
je 0x40a0d0
push 0
push edi
push ebx
call esi
pop edi
pop esi
pop ebx
leave
ret 8