joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4020a2
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, edx
push edi
mov dword [ebp - 0xc], ebx
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x40e774], eax
je 0x4020de
pop edi
mov eax, 0x10dd
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d62
mov esp, ebp
pop ebp
ret
mov eax, dword [0x40e770]
test eax, eax
jne 0x4021ee
test ebx, ebx
jne 0x402102
pop edi
lea eax, [ebx + 0x57]
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d62
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x40211b
cmp dword [edi], 0
jne 0x402130
mov dword [0x40e770], 6
mov dword [0x40e77c], edi
pop edi
mov eax, 6
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d62
mov esp, ebp
pop ebp
ret
push esi
push 0x18
call fcn.00407d75
mov ecx, dword [edi]
add esp, 4
mov esi, eax
call fcn.00401520
mov ecx, dword [ebp - 0xc]
mov ebx, eax
call fcn.00401520
movzx ecx, byte [ebx + 0x36]
mov edx, eax
mov eax, dword [ebx + 0x40]
sub eax, ecx
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x4021c6
cmp ecx, 0x1e
ja 0x4021c6
cmp dword [ebx + 0x44], edx
jne 0x4021c6
lea edx, [ebp - 8]
mov dword [ebp - 8], 0
push edx
push 0x40
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x40218d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x4021d4
mov eax, dword [ebp - 0xc]
mov dword [esi + 0xc], eax
mov dword [esi + 8], edi
mov dword [esi + 0x10], ebx
mov dword [esi + 4], 1
mov eax, dword [ebp - 8]
mov dword [esi + 0x14], eax
mov eax, dword [0x40e788]
mov dword [esi], eax
xor eax, eax
mov dword [0x40e788], esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d62
mov esp, ebp
pop ebp
ret
cmp dword [0x40e5b8], 0
mov ebx, 9
jne 0x4021da
mov dword [0x40e770], ebx
push 0x18
push esi
call fcn.00407daa
add esp, 8
mov dword [0x40e77c], edi
mov eax, ebx
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.00407d62
mov esp, ebp
pop ebp
ret
Function at 0x4038d2
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403903
mov ecx, 9
lea eax, [ebp - 0x20c]
mov esi, str.lump_checksums.csv
rep movsd dword es:[edi], dword [esi]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4039a5
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
xor edx, edx
mov ecx, esi
add ecx, 1
push 1
setb dl
neg edx
or edx, ecx
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
add esp, 8
mov edi, eax
push 0
push 0
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x40399b
mov dword [0x40e610], edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407d62
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407d62
mov esp, ebp
pop ebp
ret

Function at 0x43b644
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x43b3c1
dec edi
or edi, ecx
inc edi
call fcn.0043b67c
add edi, edi
dec edi
add edi, 0x5278ee17
xor dword [ebx], eax
mov edi, ecx
sub edi, 0xfcc1ea8b
inc ebx
mov edi, ecx
add edi, edi
cmp ebx, esi
jne fcn.0043b644
mov ecx, 0x9cecc328
ret
Function at 0x404080
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [esp], sym.brltty.exe_endProgram
call fcn.004015b0
call sym.brltty.exe_initializeSystemObject
mov dword [esp + 4], 0x4762f2
mov dword [esp], 0
call sub.msvcrt.dll_setlocale
call sym.brltty.exe_getProgramPath
test eax, eax
mov dword [sym.brltty.exe_programPath], eax
je 0x404162
mov dword [esp + 8], sym.brltty.exe_programPath
mov dword [esp + 4], 0x403b20
mov dword [esp], str.program_path
call sym.brltty.exe_onProgramExit
mov eax, dword [sym.brltty.exe_programPath]
mov dword [esp], eax
call sym.brltty.exe_isExplicitPath
test eax, eax
je 0x40417d
mov eax, dword [sym.brltty.exe_programPath]
mov dword [esp], eax
call sym.brltty.exe_isExplicitPath
test eax, eax
jne 0x404122
mov eax, dword [sym.brltty.exe_programPath]
mov dword [esp], eax
call sym.brltty.exe_locatePathName
mov dword [esp], eax
mov dword [sym.brltty.exe_programName], eax
call sym.brltty.exe_pushLogPrefix
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.brltty.exe_programPath]
mov dword [esp], eax
call sym.brltty.exe_isAbsolutePath
test eax, eax
jne 0x404100
call sym.brltty.exe_getWorkingDirectory
test eax, eax
mov ebx, eax
je 0x404100
mov eax, dword [sym.brltty.exe_programPath]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym.brltty.exe_makePath
test eax, eax
je 0x404158
mov dword [sym.brltty.exe_programPath], eax
mov dword [esp], ebx
call sub.msvcrt.dll_free
jmp 0x404100
mov eax, dword [esp + 0x44]
mov eax, dword [eax]
mov dword [esp], eax
mov dword [sym.brltty.exe_programPath], eax
call sym.brltty.exe_isExplicitPath
test eax, eax
jne 0x4040ef
mov dword [esp], str.PATH
mov esi, dword [sym.brltty.exe_programPath]
call sub.msvcrt.dll_getenv
test eax, eax
je 0x404208
lea edx, [esp + 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x3a
mov dword [esp], eax
call sym.brltty.exe_splitString
test eax, eax
mov ebx, eax
je 0x404208
mov edx, dword [esp + 0x1c]
xor ebp, ebp
mov edi, 0x4762f0
test edx, edx
jg 0x4041cb
jmp 0x404200
add ebp, 1
cmp ebp, dword [esp + 0x1c]
jge 0x404200
mov eax, dword [ebx + ebp*4]
mov edx, esi
cmp byte [eax], 0
cmove eax, edi
call fcn.00403b50
test eax, eax
je 0x4041c2
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call sym.brltty.exe_deallocateStrings
mov eax, dword [esp + 0xc]
mov dword [sym.brltty.exe_programPath], eax
jmp 0x4040f4
mov dword [esp], ebx
call sym.brltty.exe_deallocateStrings
mov edx, dword [sym.brltty.exe_programPath]
mov eax, 0x4762f0
call fcn.00403b50
test eax, eax
je 0x4040ef
jmp 0x4041ef
Function at 0x406ce0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov ebx, eax
sub esp, 0x20
mov edx, dword [eax]
test edx, edx
je 0x406d45
mov dword [esp + 4], 0xffffffff
mov dword [esp], edx
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
cmp eax, 0x80
je 0x406dc7
cmp eax, 0x102
je 0x406dc0
test eax, eax
je 0x406dc7
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
mov dword [esp + 8], 0x476b60
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov dword [ebp - 0xc], eax
je 0x406da1
lea eax, [ebp - 0xc]
call fcn.00406ce0
test eax, eax
jne 0x406dc0
mov edx, dword [ebx]
test edx, edx
je 0x406df8
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.kernel32.dll_ReleaseMutex
sub esp, 4
test eax, eax
je 0x406dd0
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.kernel32.dll_CloseHandle
sub esp, 4
test eax, eax
jne 0x406dc0
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
lea esi, [esi]
mov edx, dword [ebx]
jmp 0x406cf0
lea esp, [ebp - 8]
xor eax, eax
pop ebx
pop esi
pop ebp
ret
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
test eax, eax
je 0x406d8f
mov edx, dword [ebx]
jmp 0x406cf0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov dword [ebx], eax
jne 0x406d7d
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
cmp dword [eax], 0
je 0x406d7d
mov edx, dword [ebx]
jmp 0x406cf0
Function at 0x406f80
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [0x4bc07c]
test eax, eax
je 0x407026
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
cmp eax, 0x80
je 0x406fd9
cmp eax, 0x102
je 0x4070d3
test eax, eax
je 0x406fd9
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
call sub.msvcrt.dll__errno
mov ecx, dword [ebp + 8]
mov ebx, dword [0x4bc078]
test ecx, ecx
je 0x406fee
test ebx, ebx
je 0x406fee
or byte [ebx + 0x10], 1
mov eax, dword [0x4bc07c]
mov dword [esp], eax
call sub.kernel32.dll_ReleaseMutex
sub esp, 4
test eax, eax
jne 0x40701d
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret
mov dword [esp + 8], 0x476b60
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x4070b8
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
cmp eax, 0x80
je 0x407091
cmp eax, 0x102
je 0x40704b
test eax, eax
je 0x407091
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
test eax, eax
jne 0x4070d3
mov eax, dword [0x4bc07c]
test eax, eax
je 0x407102
mov dword [esp], ebx
call sub.kernel32.dll_ReleaseMutex
sub esp, 4
test eax, eax
je 0x4070dd
mov dword [esp], ebx
call sub.kernel32.dll_CloseHandle
sub esp, 4
test eax, eax
jne 0x4070d3
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
call sub.msvcrt.dll__errno
mov eax, dword [0x4bc07c]
jmp 0x406f95
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
mov esi, dword [eax]
test esi, esi
jne 0x4070d3
nop
jmp 0x4070a9
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov dword [0x4bc07c], eax
jne 0x40709a
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
cmp dword [eax], 0
jne 0x4070d3
nop
jmp 0x40709a
Function at 0x407160
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [0x4bc07c]
mov ebx, dword [ebp + 8]
test eax, eax
je 0x4071f1
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
cmp eax, 0x80
je 0x4071b9
cmp eax, 0x102
je 0x4072a2
test eax, eax
je 0x4071b9
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
mov dword [esp + 8], 3
mov dword [esp + 4], ebx
mov dword [esp], 0x4bc078
call sym.brltty.exe_pushLogEntry
mov eax, dword [0x4bc07c]
mov dword [esp], eax
call sub.kernel32.dll_ReleaseMutex
sub esp, 4
test eax, eax
je 0x4072b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x476b60
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov esi, eax
je 0x407287
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call sub.kernel32.dll_WaitForSingleObject
sub esp, 8
cmp eax, 0x80
je 0x40725c
cmp eax, 0x102
je 0x407216
test eax, eax
je 0x40725c
call sub.msvcrt.dll__errno
mov edi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [edi], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
test eax, eax
jne 0x4072a2
mov eax, dword [0x4bc07c]
test eax, eax
je 0x4072f8
mov dword [esp], esi
call sub.kernel32.dll_ReleaseMutex
sub esp, 4
test eax, eax
je 0x4072d2
mov dword [esp], esi
call sub.kernel32.dll_CloseHandle
sub esp, 4
test eax, eax
jne 0x4072a2
call sub.msvcrt.dll__errno
mov esi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [esi], eax
call sub.msvcrt.dll__errno
mov eax, dword [0x4bc07c]
jmp 0x407175
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
jmp sub.msvcrt.dll__errno
call sub.msvcrt.dll__errno
mov edi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [edi], eax
call sub.msvcrt.dll__errno
mov eax, dword [eax]
test eax, eax
jne 0x4072a2
jmp 0x407278
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.kernel32.dll_CreateMutexA
sub esp, 0xc
test eax, eax
mov dword [0x4bc07c], eax
jne 0x407269
call sub.msvcrt.dll__errno
mov edi, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [edi], eax
call sub.msvcrt.dll__errno
cmp dword [eax], 0
jne 0x4072a2
jmp 0x407269
Function at 0x407d00
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8c
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__stat64
cmp eax, 0xffffffff
je 0x407dbc
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x6c]
movzx ecx, word [esp + 0x4e]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x4c]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x74]
mov word [esp + 0x1e], cx
and cx, 0xf000
cmp cx, 0x8000
mov word [esp + 0x1c], ax
movzx eax, word [esp + 0x50]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x7c]
mov word [esp + 0x20], ax
movzx eax, word [esp + 0x52]
mov dword [esp + 0x44], edx
mov word [esp + 0x22], ax
movzx eax, word [esp + 0x54]
mov word [esp + 0x24], ax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x40], eax
mov eax, 1
je 0x407dbe
call sub.msvcrt.dll__errno
mov dword [eax], 0x11
xor eax, eax
add esp, 0x8c
ret

Function at 0x407dd0
Capabilities:
Query environment variable

Disassembly:
push esi
push ebx
sub esp, 0x14
mov ebx, dword [esp + 0x20]
mov dword [esp], ebx
call sym.brltty.exe_testFilePath
test eax, eax
je 0x407e30
mov dword [esp], ebx
call sym.brltty.exe_locatePathExtension
test eax, eax
mov esi, eax
je 0x407e30
mov ebx, dword [0x4bc094]
test ebx, ebx
je 0x407e38
mov edx, dword [ebx]
test edx, edx
jne 0x407e0e
jmp 0x407e30
add ebx, 4
mov edx, dword [ebx]
test edx, edx
je 0x407e30
mov dword [esp + 4], esi
mov dword [esp], edx
call sub.msvcrt.dll__stricmp
test eax, eax
jne 0x407e05
add esp, 0x14
mov eax, 1
pop ebx
pop esi
ret
add esp, 0x14
xor eax, eax
pop ebx
pop esi
ret
mov dword [esp], str.PATHEXT
mov ebx, 0x4bc090
call sub.msvcrt.dll_getenv
mov dword [0x4bc094], 0x4bc090
test eax, eax
je 0x407dfd
mov dword [esp + 8], 0
mov dword [esp + 4], 0x3b
mov dword [esp], eax
call sym.brltty.exe_splitString
mov ebx, dword [0x4bc094]
test eax, eax
je 0x407dfd
mov dword [0x4bc094], eax
mov ebx, eax
jmp 0x407dfd
Function at 0x407e90
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8c
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x90]
mov dword [esp], eax
call sub.msvcrt.dll__stat64
cmp eax, 0xffffffff
je 0x407f4c
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x6c]
movzx ecx, word [esp + 0x4e]
mov dword [esp + 0x18], eax
movzx eax, word [esp + 0x4c]
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x74]
mov word [esp + 0x1e], cx
and cx, 0xf000
cmp cx, 0x4000
mov word [esp + 0x1c], ax
movzx eax, word [esp + 0x50]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x7c]
mov word [esp + 0x20], ax
movzx eax, word [esp + 0x52]
mov dword [esp + 0x44], edx
mov word [esp + 0x22], ax
movzx eax, word [esp + 0x54]
mov word [esp + 0x24], ax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x40], eax
mov eax, 1
je 0x407f4e
call sub.msvcrt.dll__errno
mov dword [eax], 0x11
xor eax, eax
add esp, 0x8c
ret

Function at 0x407f60
Capabilities:
Create directory

Disassembly:
push ebx
sub esp, 0x28
mov ebx, dword [esp + 0x30]
mov dword [esp], ebx
call sub.msvcrt.dll__mkdir
mov edx, 1
cmp eax, 0xffffffff
je 0x407f81
add esp, 0x28
mov eax, edx
pop ebx
ret
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str.cannot_create_directory
mov dword [esp + 4], 0x476c12
mov dword [esp], 4
mov dword [esp + 0x10], eax
call sym.brltty.exe_logMessage
xor edx, edx
add esp, 0x28
mov eax, edx
pop ebx
ret

Function at 0x4082b0
Capabilities:
Query environment variable

Disassembly:
push ebx
xor ebx, ebx
sub esp, 0x18
mov dword [esp], 0x476cb2
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4082d9
cmp byte [eax], 0
je 0x4082d9
mov dword [esp], eax
call sub.msvcrt.dll__strdup
test eax, eax
je 0x4082e0
mov ebx, eax
add esp, 0x18
mov eax, ebx
pop ebx
ret
call sym.brltty.exe_logMallocError
jmp 0x4082d9
Function at 0x4089d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.kernel32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x408a10
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
leave
ret
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
mov eax, 0xffffffff
jmp 0x408a09

Function at 0x408a30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.kernel32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x408a70
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
leave
ret
call sub.msvcrt.dll__errno
mov ebx, eax
call sub.kernel32.dll_GetLastError
mov dword [esp], eax
call sym.brltty.exe_win_toErrno
mov dword [ebx], eax
mov eax, 0xffffffff
jmp 0x408a69

Function at 0x408aa0
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
lea eax, [ebp - 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], 0xc
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], 1
mov dword [esp], eax
call sub.kernel32.dll_CreatePipe
sub esp, 0x10
test eax, eax
je 0x408af0
mov eax, 1
leave
ret
mov dword [esp], 0x476d67
mov dword [ebp - 0x1c], eax
call sym.brltty.exe_logWindowsSystemError
mov eax, dword [ebp - 0x1c]
leave
ret

Function at 0x408b10
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.ws2_32.dll_recv
sub esp, 0x10
leave
ret

Function at 0x408b40
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.ws2_32.dll_send
sub esp, 0x10
leave
ret
Function at 0x408bf0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
call sym.brltty.exe_getConsole
test eax, eax
mov ebp, eax
je 0x408c67
test ebx, ebx
je 0x408c5a
nop
mov dword [esp + 0xc], ebp
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fwrite
test byte [ebp + 0xc], 0x20
mov esi, eax
je 0x408c46
mov dword [esp], str.console_write
call sym.brltty.exe_logSystemError
add esp, 0x1c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebp
call sub.msvcrt.dll_fflush
test byte [ebp + 0xc], 0x20
jne 0x408c30
add edi, esi
sub ebx, esi
jne 0x408c10
add esp, 0x1c
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
add esp, 0x1c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x408ca0
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x4bc0a0]
test eax, eax
je 0x408cb0
ret
push ebp
mov eax, str.DTDEVROOT
mov ebp, esp
push edi
push esi
mov esi, 0x476ed0
push ebx
sub esp, 0x2c
jmp 0x408cd2
add esi, 4
mov eax, dword [esi]
test eax, eax
je 0x408d63
mov dword [esp], eax
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x408cc5
cmp byte [eax], 0
je 0x408cc5
mov dword [ebp - 0x1c], esp
mov edi, 0x10
mov dword [esp], eax
call sub.msvcrt.dll_strlen
xor edx, edx
lea ecx, [eax + 4]
add eax, 0x13
div edi
shl eax, 4
call fcn.0046d550
sub esp, eax
lea edi, [esp + 0x14]
mov dword [esp + 4], ecx
mov dword [esp + 0x10], 0x476dd2
mov dword [esp + 0xc], ebx
mov dword [esp + 8], str._s_s
mov dword [esp], edi
call fcn.0046e270
mov dword [esp], edi
call sym.brltty.exe_testDirectoryPath
test eax, eax
je 0x408d97
mov dword [esp], edi
call sub.msvcrt.dll__strdup
test eax, eax
mov dword [0x4bc0a0], eax
jne 0x408dd7
call sym.brltty.exe_logMallocError
add esi, 4
mov esp, dword [ebp - 0x1c]
mov eax, dword [esi]
test eax, eax
jne 0x408cd2
mov dword [0x4bc0a0], 0x476dd2
mov eax, 0x476dd2
mov dword [esp + 8], eax
mov dword [esp + 4], str.device_directory:__s
mov dword [esp], 7
call sym.brltty.exe_logMessage
mov eax, dword [0x4bc0a0]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x408d53
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
mov dword [esp + 0x10], eax
mov eax, dword [esi]
mov dword [esp + 8], edi
mov dword [esp + 4], str.device_directory_error:__s___s_:__s
mov dword [esp], 3
mov dword [esp + 0xc], eax
call sym.brltty.exe_logMessage
jmp 0x408d53
mov esp, dword [ebp - 0x1c]
jmp 0x408d72