joyce8/EMBER2024-capa huggingface dataset:
Function at 0x58c350
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x20]
call sym.___pthread_self_lite
mov ebx, eax
mov dword [eax + 4], esi
mov eax, dword [eax + 0xb4]
test eax, eax
jne 0x58c3d3
test byte [ebx + 0x20], 0x30
jne 0x58c387
add ebx, 0x70
mov dword [esp + 4], 1
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_longjmp]
mov eax, dword [0x5c0070]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
push edx
mov ebx, eax
je 0x58c3ca
cmp dword [eax + 0x14], 0
je 0x58c417
mov esi, dword [eax + 4]
mov dword [eax + 0x68], 1
mov eax, dword [eax + 0x18]
test eax, eax
je 0x58c3bd
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
test byte [ebx + 0x24], 4
mov dword [ebx + 0x18], 0
jne 0x58c3da
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__endthreadex]
call sym.__pthread_cleanup_dest.part.6
jmp 0x58c36d
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
cmp dword [ebx + 0xb0], 0
mov dword [ebx + 0x14], 0
je 0x58c441
mov eax, dword [0x5c0070]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x58c3ca
mov dword [eax], 0xdeadbeef
mov eax, dword [eax + 0x18]
test eax, eax
je 0x58c42e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
cmp dword [ebx + 0xb0], 0
mov dword [ebx + 0x18], 0
mov esi, dword [ebx + 4]
jne 0x58c3fd
mov eax, ebx
call sym._push_pthread_mem.part.1
jmp 0x58c3fd
Function at 0x58c730
Capabilities:
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2ec
mov esi, dword [esp + 0x300]
mov dword [esp], esi
call dbg.__pth_gpointer_locked
test eax, eax
je 0x58c75a
mov ebx, eax
mov eax, dword [eax + 0x14]
lea edx, [eax - 1]
cmp edx, 0xfffffffd
jbe 0x58c770
mov eax, 3
add esp, 0x2ec
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [esp + 0x14]
mov dword [esp], eax
mov dword [esp + 4], edi
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x58c75a
lea ebp, [ebx + 0x1c]
mov dword [esp], ebp
call dbg.pthread_mutex_lock
call sym.___pthread_self_lite
test eax, eax
je 0x58c920
mov eax, dword [eax + 0xb4]
cmp esi, eax
je 0x58c80d
mov eax, dword [ebx + 0x24]
and eax, 3
cmp eax, 3
movzx eax, byte [ebx + 0x20]
je 0x58c862
test al, 3
jne 0x58c7f4
and eax, 0xfffffffc
or eax, 1
mov byte [ebx + 0x20], al
lock add dword [0x743b00], 1
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x58c7e5
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov dword [esp], ebp
call dbg.pthread_mutex_unlock
xor eax, eax
jmp 0x58c75f
mov dword [esp], ebp
call dbg.pthread_mutex_unlock
test byte [ebx + 0x20], 0xc
jne 0x58c75a
xor eax, eax
jmp 0x58c75f
movzx eax, byte [ebx + 0x20]
test al, 3
jne 0x58c7f4
and eax, 0xfffffffc
or eax, 1
mov byte [ebx + 0x20], al
lock add dword [0x743b00], 1
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x58c839
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
sub esp, 4
mov eax, dword [ebx + 0x24]
and eax, 3
cmp eax, 3
jne 0x58c7e5
movzx eax, byte [ebx + 0x20]
and dword [ebx + 0x24], 0xfffffffe
and eax, 0xfffffff3
or eax, 4
mov byte [ebx + 0x20], al
mov dword [esp], ebp
call dbg.pthread_mutex_unlock
call dbg._pthread_invoke_cancel
test al, 0xc
jne 0x58c7f4
test al, 0xf
jne 0x58c75a
mov eax, dword [ebx + 0x14]
mov dword [esp + 0x14], 0x10001
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push eax
mov dword [esp + 4], 0
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
push edx
push edx
jne 0x58c7e5
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
push ecx
push ecx
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x14]
mov dword [esp + 0xcc], dbg._pthread_invoke_cancel
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push esi
push esi
movzx eax, byte [ebx + 0x20]
and dword [ebx + 0x24], 0xfffffffe
and eax, 0xfffffff0
or eax, 5
mov byte [ebx + 0x20], al
lock add dword [0x743b00], 1
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x58c8fd
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edx
mov dword [esp], ebp
call dbg.pthread_mutex_unlock
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push eax
jmp 0x58c7e5
xor eax, eax
jmp 0x58c7a6
Function at 0x5937c0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
xor ebx, ebx
sub esp, 0x14
mov dword [esp], str.LIBUSB_DEBUG
call sym._getenv
test eax, eax
je 0x5937f1
mov dword [esp], eax
call sym._atoi
mov edx, 4
cmp eax, 4
cmovg eax, edx
test eax, eax
cmovns ebx, eax
add esp, 0x14
mov eax, ebx
pop ebx
pop ebp
ret
Function at 0x59a290
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edi, dword [edx]
test edi, edi
js 0x59a494
cmp dword [edx + 4], 0xf423f
ja 0x59a494
test ebx, ebx
je 0x59a435
lea ecx, [ebp - 0x20]
mov eax, ebx
call sym._get_next_timeout
test eax, eax
mov edi, eax
je 0x59a337
jmp 0x59a420
mov dword [esp], ebx
call sym._libusb_lock_event_waiters_4
sub esp, 4
test esi, esi
je 0x59a2f9
mov eax, dword [esi]
test eax, eax
jne 0x59a405
mov dword [esp], ebx
call sym._libusb_event_handler_active_4
sub esp, 4
test eax, eax
jne 0x59a3b0
mov dword [esp], ebx
call sym._libusb_unlock_event_waiters_4
sub esp, 4
mov dword [esp + 0xc], str.event_handler_was_active_but_went_away__retrying
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._usbi_log
mov dword [esp], ebx
call sym._libusb_try_lock_events_4
sub esp, 4
test eax, eax
jne 0x59a2e0
test esi, esi
je 0x59a350
mov edx, dword [esi]
test edx, edx
jne 0x59a397
mov dword [esp + 0xc], str.doing_our_own_event_handling
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov edi, 0xfffffffa
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._usbi_log
mov eax, dword [ebx + 0xb8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
jne 0x59a397
lea edx, [ebp - 0x20]
mov eax, ebx
call sym._handle_events.part.7
mov edi, eax
mov dword [esp], ebx
call sym._libusb_unlock_events_4
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov dword [esp + 0xc], str.another_thread_is_doing_event_handling
mov dword [esp + 8], str.libusb_handle_events_timeout_completed
mov dword [esp + 4], 4
mov dword [esp], ebx
call sym._usbi_log
lea eax, [ebp - 0x20]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._libusb_wait_for_event_8
sub esp, 8
mov esi, eax
mov dword [esp], ebx
mov edi, esi
call sym._libusb_unlock_event_waiters_4
sub esp, 4
test esi, esi
js 0x59a3a2
xor edi, edi
cmp esi, 1
jne 0x59a3a2
mov eax, ebx
call sym._handle_timeouts
jmp 0x59a3a2
mov dword [esp], ebx
xor edi, edi
call sym._libusb_unlock_event_waiters_4
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov eax, ebx
xor edi, edi
call sym._handle_timeouts
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov ebx, dword [0x746408]
test ebx, ebx
jne 0x59a2c1
mov ebx, dword [0x74640c]
test ebx, ebx
je 0x59a2c1
mov ecx, dword [0x743b48]
test ecx, ecx
jne 0x59a2c1
mov dword [esp + 0xc], str.API_misuse__Using_non_default_context_as_implicit_default.
mov dword [esp + 8], str.usbi_get_context
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [ebp - 0x2c], edx
call sym._usbi_log
mov dword [0x743b48], 1
mov edx, dword [ebp - 0x2c]
jmp 0x59a2c1
mov edi, 0xfffffffe
jmp 0x59a3a2
Function at 0x59a550
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov ecx, dword [edx]
test ecx, ecx
js 0x59a620
cmp dword [edx + 4], 0xf423f
ja 0x59a620
test ebx, ebx
je 0x59a5c4
lea ecx, [ebp - 0x10]
mov eax, ebx
call sym._get_next_timeout
test eax, eax
jne 0x59a5b4
mov eax, dword [ebx + 0xb8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
sub esp, 4
mov eax, 0xfffffffa
test edx, edx
jne 0x59a5ad
lea edx, [ebp - 0x10]
mov eax, ebx
call sym._handle_events.part.7
mov ebx, dword [ebp - 4]
leave
ret 8
mov eax, ebx
call sym._handle_timeouts
xor eax, eax
mov ebx, dword [ebp - 4]
leave
ret 8
mov ebx, dword [0x746408]
test ebx, ebx
jne 0x59a578
mov ebx, dword [0x74640c]
test ebx, ebx
je 0x59a578
mov eax, dword [0x743b48]
test eax, eax
jne 0x59a578
mov dword [esp + 0xc], str.API_misuse__Using_non_default_context_as_implicit_default.
mov dword [esp + 8], str.usbi_get_context
mov dword [esp + 4], 1
mov dword [esp], ebx
mov dword [ebp - 0x1c], edx
call sym._usbi_log
mov dword [0x743b48], 1
mov edx, dword [ebp - 0x1c]
jmp 0x59a578
mov eax, 0xfffffffe
jmp 0x59a5ad
Function at 0x59ae50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 0x14]
test eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x2c], esi
je 0x59af40
mov ebx, eax
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x30], edx
mov esi, ecx
mov eax, dword [eax + 4]
mov eax, dword [eax + 0xb8]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
mov edx, 0xfffffffa
jne 0x59af2f
mov dword [esp], 0
call sym._libusb_alloc_transfer_4
sub esp, 4
test eax, eax
mov edi, eax
je 0x59aff1
mov dword [eax], ebx
movzx eax, byte [ebp - 0x30]
mov dword [edi + 0x20], esi
mov dword [edi + 0x18], sym._sync_transfer_cb_4
mov byte [edi + 5], al
mov eax, dword [ebp + 0x10]
mov dword [edi + 8], eax
mov eax, dword [ebp + 8]
mov dword [edi + 0x10], eax
lea eax, [ebp - 0x1c]
mov dword [edi + 0x1c], eax
movzx eax, byte [ebp - 0x2c]
mov byte [edi + 6], al
mov dword [esp], edi
call sym._libusb_submit_transfer_4
sub esp, 4
test eax, eax
js 0x59afd4
mov eax, edi
call sym._sync_transfer_wait_for_completion
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x59af08
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [edi + 0xc]
cmp eax, 6
ja case.default.0x59af14
jmp dword [eax*4 + 0x729714]
xor ebx, ebx
mov dword [esp], edi
call sym._libusb_free_transfer_4
mov edx, ebx
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0xb8]
ud2
mov ebx, 0xfffffff9
jmp 0x59af22
mov ebx, 0xffffffff
jmp 0x59af22
mov ebx, 0xfffffffc
jmp 0x59af22
mov ebx, 0xfffffff7
jmp 0x59af22
mov ebx, 0xfffffff8
jmp 0x59af22
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.unrecognised_status_code__d
mov dword [esp + 8], str.do_sync_bulk_transfer
mov dword [esp + 4], 2
mov eax, dword [ebx + 0x24]
mov ebx, 0xffffff9d
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
jmp 0x59af22
mov dword [esp], edi
mov dword [ebp - 0x2c], eax
call sym._libusb_free_transfer_4
mov eax, dword [ebp - 0x2c]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
mov edx, eax
pop esi
mov eax, edx
pop edi
pop ebp
ret
mov edx, 0xfffffff5
jmp 0x59af2f
Function at 0x59d030
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x11c]
sub esp, 0x12c
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, eax
sub eax, 1
sub esp, 8
cmp eax, 0x102
ja 0x59d0e0
mov eax, dword [ebp + 0xc]
lea edi, [ebx + esi]
mov dword [esp], eax
call sym._strlen
lea eax, [esi + eax + 6]
cmp eax, 0x103
ja 0x59d0b0
mov eax, dword [ebp + 0xc]
mov dword [esp], edi
mov dword [esp + 4], str._s.dll
mov dword [esp + 8], eax
call sym._sprintf
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.program_assertion_failed___library_path_buffer_overflow
mov eax, dword [ebp + 8]
mov dword [esp + 8], str.load_system_library
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._usbi_log
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], str.program_assertion_failed___could_not_get_system_directory
jmp 0x59d0b8
Function at 0x59d0f0
Capabilities:
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [ebp + 8]
test edx, edx
je 0x59d305
mov eax, dword [ebp + 8]
lea edx, [eax + 1]
movsx eax, byte [eax]
test al, al
je 0x59d30f
mov ecx, 0x1505
lea esi, [esi]
mov ebx, ecx
add edx, 1
shl ebx, 5
add eax, ebx
add ecx, eax
movsx eax, byte [edx - 1]
test al, al
jne 0x59d120
test ecx, ecx
mov ebx, 8
mov edi, 1
jne 0x59d2b0
mov dword [esp], 0x743c84
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x743c9c]
sub esp, 4
add ebx, edx
mov eax, dword [ebx]
test eax, eax
jne 0x59d1c0
mov ebx, edi
cmp dword [0x743c80], 0x3fc
jbe 0x59d275
mov dword [esp + 0x10], 0x3fd
mov dword [esp + 0xc], str.hash_table_is_full___lu_entries_
xor ebx, ebx
mov dword [esp + 8], str.htab_hash
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._usbi_log
mov dword [esp], 0x743c84
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
cmp edi, eax
mov esi, dword [ebx + 4]
jne 0x59d1dc
mov eax, dword [ebp + 8]
mov dword [esp + 4], esi
mov ebx, edi
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x59d1a4
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], esi
mov esi, edi
mov dword [esp + 0xc], str.hash_collision___s_vs__s_
mov dword [esp + 8], str.htab_hash
mov ebx, edi
mov dword [esp + 4], 4
mov dword [esp], 0
mov dword [esp + 0x10], eax
call sym._usbi_log
mov eax, edi
mov edx, 0x14191f7
mul edx
mov eax, edi
sub eax, edx
shr eax, 1
add eax, edx
mov edx, dword [0x743c9c]
shr eax, 9
imul eax, eax, 0x3fb
sub esi, eax
mov eax, 0x3fd
add esi, 1
sub eax, esi
mov dword [ebp - 0x1c], eax
nop
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
sub ecx, esi
add eax, ebx
cmp ebx, esi
cmova eax, ecx
cmp edi, eax
mov ebx, eax
je 0x59d166
lea ecx, [edx + eax*8]
mov eax, dword [ecx]
cmp edi, eax
je 0x59d2e0
test eax, eax
jne 0x59d240
cmp dword [0x743c80], 0x3fc
ja 0x59d176
lea esi, [ebx*8]
mov ecx, dword [ebp + 8]
lea eax, [edx + esi]
mov dword [esp], ecx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.msvcrt.dll__strdup]
add esi, dword [0x743c9c]
mov edx, dword [ebp - 0x1c]
mov dword [edx + 4], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x59d320
mov dword [esi], edi
add dword [0x743c80], 1
jmp 0x59d1a4
mov eax, ecx
mov edx, 0xc0906d
mul edx
mov eax, ecx
sub eax, edx
shr eax, 1
add edx, eax
shr edx, 9
imul edx, edx, 0x3fd
sub ecx, edx
je 0x59d146
mov edi, ecx
jmp 0x59d314
mov eax, dword [ecx + 4]
mov dword [ebp - 0x20], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strcmp
test eax, eax
mov edx, dword [ebp - 0x20]
jne 0x59d240
jmp 0x59d1a4
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, 0x114
lea ebx, [edi*8]
jmp 0x59d146
mov dword [esp + 0xc], str.could_not_duplicate_string_for_hash_table
mov dword [esp + 8], str.htab_hash
xor ebx, ebx
mov dword [esp + 4], 1
mov dword [esp], 0
call sym._usbi_log
jmp 0x59d1a4
Function at 0x5a3520
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ecx, dword [ecx + 0x24]
cmp eax, 0xffffffff
mov dword [ebp - 0x1c], ecx
je 0x5a35b0
mov edx, eax
shl edx, 6
mov eax, dword [edx + eax*4 + 0x743d00]
test eax, eax
je 0x5a3620
mov eax, dword [ebp - 0x1c]
xor esi, esi
lea ebx, [eax + 0x4c]
mov eax, dword [ebp + 0xc]
lea edi, [eax + 0x38]
jmp 0x5a356e
add esi, 1
add ebx, 0x1c
add edi, 0x28
cmp esi, 0x20
je 0x5a35a0
mov edx, dword [ebx]
test edx, edx
je 0x5a3560
mov eax, dword [ebx + 4]
cmp byte [eax], 3
jne 0x5a3560
mov eax, dword [ebp + 0xc]
mov ecx, 0xc0000000
call sym._windows_open_1
cmp eax, 0xffffffff
je 0x5a35b5
add esi, 1
mov dword [edi], eax
add ebx, 0x1c
add edi, 0x28
cmp esi, 0x20
jne 0x5a356e
nop
xor eax, eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ecx + 0x48]
jmp 0x5a353a
mov dword [esp], 0
call sym._windows_error_str
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
imul esi, esi, 0x1c
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + esi + 0x4c]
mov dword [esp + 0xc], str.could_not_open_device__s__interface__d_:__s
mov dword [esp + 8], str.winusbx_open
mov dword [esp + 4], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x24]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._usbi_log
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov eax, 0xfffffffc
cmp edx, 2
je 0x5a35a2
xor eax, eax
cmp edx, 5
setne al
lea eax, [eax + eax - 3]
jmp 0x5a35a2
mov eax, 0xfffffffd
jmp 0x5a35a2
Function at 0x5ab420
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x5ab480
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x7443bc]
test esi, esi
jle 0x5ab573
mov edi, dword [0x7443c0]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x5ab4b4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x5ab56c
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x5ab4a0
mov dword [esp], eax
mov ebx, eax
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x5ab5b0
lea ebx, [esi + esi*4]
mov esi, dword [0x7443c0]
shl ebx, 2
add esi, ebx
mov dword [esi + 0x10], eax
mov dword [esi], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
mov dword [esi + 0xc], eax
lea eax, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], eax
mov eax, dword [0x7443c0]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x5ab590
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x5ab565
sub eax, 4
and eax, 0xfffffffb
je 0x5ab565
add ebx, dword [0x7443c0]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
je 0x5ab57a
add dword [0x7443bc], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor esi, esi
jmp 0x5ab4be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
mov eax, dword [0x7443c0]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
Function at 0x5aba20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x7443d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x7443d0]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x5aba75
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x5aba6e
test esi, esi
je 0x5aba6e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x5aba50
mov dword [esp], 0x7443d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x5b9e03
Capabilities:
Send data
Send data on socket

Disassembly:
cmp edx, 0x1f
jne 0x5ba018
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov edi, dword [eax]
mov ebx, dword [edi + 0x128]
lea ebp, [ebx + 0x1cb0]
lea edx, [ebx + 0x1eb0]
cmp ebp, edx
jb 0x5b9e33
mov dword [ebx + 0x1eb0], ebp
jmp 0x5b9e46
lea ecx, [ebx + 0x1cb1]
mov byte [ebx + 0x1cb0], 0xff
mov dword [ebx + 0x1eb0], ecx
mov ecx, dword [ebx + 0x1eb0]
cmp edx, ecx
jbe 0x5b9e5c
lea esi, [ecx + 1]
mov dword [ebx + 0x1eb0], esi
mov byte [ecx], 0xfa
mov ecx, dword [ebx + 0x1eb0]
cmp edx, ecx
jbe 0x5b9e72
lea esi, [ecx + 1]
mov dword [ebx + 0x1eb0], esi
mov byte [ecx], 0x1f
mov esi, eax
movzx eax, word [ebx + 0x1ca8]
mov ecx, dword [sym.imp.WS2_32.dll_htons]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ecx
mov dword [esp], eax
call ecx
push edx
mov ecx, dword [esp + 0x18]
mov word [esp + 0x2c], ax
movzx eax, word [ebx + 0x1caa]
mov dword [esp], eax
call ecx
push ecx
mov edx, dword [esp + 0x1c]
mov word [esp + 0x2e], ax
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9ec7
lea ecx, [eax + 1]
mov dword [ebx + 0x1eb0], ecx
mov cl, byte [esp + 0x2c]
mov byte [eax], cl
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9ee0
lea ecx, [eax + 1]
mov dword [ebx + 0x1eb0], ecx
mov cl, byte [esp + 0x2d]
mov byte [eax], cl
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9ef9
lea ecx, [eax + 1]
mov dword [ebx + 0x1eb0], ecx
mov cl, byte [esp + 0x2e]
mov byte [eax], cl
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9f12
lea ecx, [eax + 1]
mov dword [ebx + 0x1eb0], ecx
mov cl, byte [esp + 0x2f]
mov byte [eax], cl
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9f28
lea ecx, [eax + 1]
mov dword [ebx + 0x1eb0], ecx
mov byte [eax], 0xff
mov eax, dword [ebx + 0x1eb0]
cmp edx, eax
jbe 0x5b9f3e
lea edx, [eax + 1]
mov dword [ebx + 0x1eb0], edx
mov byte [eax], 0xf0
mov eax, dword [ebx + 0x1eb0]
mov dword [ebx + 0x1eb0], ebp
mov dword [ebx + 0x1eb4], eax
test byte [edi + 0xabf], 0x40
je 0x5b9f73
sub eax, ebp
lea ecx, [ebx + 0x1cb2]
mov edx, 0x3e
sub eax, 2
mov dword [esp], eax
mov eax, edi
call sym._printsub.part.1
mov dword [esp + 4], ebp
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov eax, dword [esi + 0x408]
mov ebp, dword [sym.imp.WS2_32.dll_send]
mov dword [esp], eax
call ebp
sub esp, 0x10
test eax, eax
jns 0x5b9fb9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], str.Sending_data_failed___d_
mov dword [esp + 8], eax
mov dword [esp], edi
call sym._Curl_failf
lea edx, [ebx + 0x1cb3]
mov ecx, 4
add ebx, 0x1cb7
mov eax, esi
call sym._send_telnet_data
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], ebx
mov eax, dword [esi + 0x408]
mov dword [esp], eax
call ebp
sub esp, 0x10
test eax, eax
jns 0x5ba011
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], str.Sending_data_failed___d_
mov dword [esp + 8], eax
mov dword [esp], edi
call sym._Curl_failf
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x5ba13a
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
mov esi, ecx
sub esp, 0x2c
mov ebp, dword [eax]
mov edi, dword [esp + 0x40]
mov byte [esp + 0x1d], 0xff
mov byte [esp + 0x1e], cl
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp], edx
mov eax, edi
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1d]
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
test eax, eax
jns 0x5ba19c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], str.Sending_data_failed___d_
mov dword [esp + 8], eax
mov dword [esp], ebp
call sym._Curl_failf
mov eax, dword [ebx]
mov dword [esp], edi
mov ecx, esi
mov edx, str.SENT
call sym._printoption
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret