joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40de40
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov dword [ebp - 0x10], 0
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push 0x443bd8
call sub.KERNEL32.dll_EnterCriticalSection
push ebx
call sub.WS2_32.DLL_gethostbyname
mov esi, eax
push ebx
call sym._free
add esp, 0x10
test esi, esi
je 0x40dea5
push eax
push 4
mov eax, dword [esi + 0xc]
mov eax, dword [eax]
push eax
push edi
call dbg.writex
add esp, 0x10
sub esp, 0xc
push 0x443bd8
call sub.KERNEL32.dll_LeaveCriticalSection
push edi
call dbg.adb_close
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
lea eax, [ebp - 0x10]
push 4
push eax
push edi
call dbg.writex
add esp, 0x10
jmp 0x40de87

Function at 0x40dec0
Capabilities:
Create thread

Disassembly:
push ebp
mov ecx, 4
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov edi, str.tcp:
mov ebx, dword [ebp + 8]
cld
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40df35
sub esp, 0xc
add ebx, 4
push ebx
call sym._atoi
pop ecx
pop edi
push 0x3a
mov esi, eax
push ebx
call sym._strchr
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x40df77
sub esp, 0xc
push 0x443bd8
call sub.KERNEL32.dll_EnterCriticalSection
push eax
push eax
lea eax, [ebx + 1]
push 1
push esi
push eax
call dbg.socket_network_client
add esp, 0x14
mov esi, eax
push 0x443bd8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
cld
mov esi, str.dns:
mov ecx, 4
mov edi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
or esi, 0xffffffff
cmp dl, al
jne 0x40df2b
sub esp, 0xc
lea eax, [ebx + 4]
push eax
call sym._strdup
add esp, 0x10
test eax, eax
je 0x40df2b
lea esp, [ebp - 0xc]
mov edx, eax
mov eax, dbg.dns_service
pop ebx
pop esi
pop edi
pop ebp
jmp dbg.create_service_thread
push edx
push edx
push 1
push esi
call dbg.socket_loopback_client
add esp, 0x10
mov esi, eax
test eax, eax
js 0x40df2b
sub esp, 0xc
push eax
call dbg.disable_tcp_nagle
add esp, 0x10
jmp 0x40df2b
Function at 0x40ff90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0
push 0
push dbg.device_poll_thread
call sym.__beginthread
add esp, 0x10
inc eax
je 0x40ffb0
leave
ret
sub esp, 0xc
push str.cannot_create_input_thread
call dbg.fatal_errno
add esp, 0x10
leave
ret

Function at 0x410c70
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov eax, 0xaaaaaaab
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mul dword [ebp + 0xc]
shr edx, 1
lea edx, [edx + edx*2]
test edx, edx
je 0x410d9c
dec edx
mov eax, 0xaaaaaaab
mul edx
shr edx, 1
mov ecx, dword [ebp + 8]
mov esi, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
add ecx, 3
lea edx, [edx + edx*2 + 3]
mov ebx, dword [ebp + 0x10]
xor edi, edi
mov dword [ebp - 0x14], edx
mov al, byte [ecx - 3]
add edi, 3
shr al, 2
and eax, 0xff
mov al, byte [eax + esi]
mov byte [ebx], al
xor eax, eax
mov al, byte [ecx - 3]
mov dl, byte [ecx - 2]
shr dl, 4
and eax, 3
shl eax, 4
and edx, 0xff
lea eax, [esi + eax]
mov al, byte [eax + edx]
xor edx, edx
mov byte [ebx + 1], al
mov dl, byte [ecx - 2]
mov al, byte [ecx - 1]
shr al, 6
and edx, 0xf
and eax, 0xff
lea edx, [esi + edx*4]
mov al, byte [edx + eax]
mov byte [ebx + 2], al
xor eax, eax
mov al, byte [ecx - 1]
and eax, 0x3f
mov al, byte [esi + eax]
mov byte [ebx + 3], al
add ebx, 4
mov dword [ebp + 8], ecx
add ecx, 3
cmp edi, dword [ebp - 0x14]
jne 0x410cb0
cmp dword [ebp + 0xc], edi
jbe 0x410d75
mov ecx, dword [ebp + 8]
xor edx, edx
lea esi, [edi + 1]
mov dl, byte [ecx]
cmp dword [ebp + 0xc], esi
ja 0x410d87
xor edi, edi
mov dword [ebp - 0x10], 0
mov eax, edx
mov ecx, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
shr eax, 2
and edx, 3
shl edx, 4
mov al, byte [eax + ecx]
mov byte [ebx], al
mov eax, dword [ebp - 0x10]
add eax, ecx
mov dword [ebp - 0x18], eax
mov dl, byte [eax + edx]
lea eax, [ebx + 2]
mov byte [ebx + 1], dl
mov dl, 0x3d
cmp dword [ebp + 0xc], esi
jbe 0x410d6c
and edi, 0xf
mov dl, byte [ecx + edi*4]
mov byte [eax], dl
mov byte [eax + 1], 0x3d
lea ebx, [eax + 2]
mov byte [ebx], 0
mov eax, dword [ebp + 0x10]
add esp, 0xc
sub ebx, eax
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp + 8]
mov al, byte [ecx + 1]
and eax, 0xff
mov edi, eax
shr eax, 4
mov dword [ebp - 0x10], eax
jmp 0x410d38
mov ebx, dword [ebp + 0x10]
xor edi, edi
jmp 0x410d1b

Function at 0x410e90
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x120
push str.ANDROID_SDK_HOME
call sym._getenv
add esp, 0x10
test eax, eax
je 0x410ec6
push eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push str._s_s_s
push eax
push ebx
call dbg.build_path
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
lea ebx, [ebp - 0x108]
push ebx
push 0
push 0
push 0x28
push 0
call sub.SHELL32.DLL_SHGetFolderPathA
add esp, 0xc
push ebx
jmp 0x410eac
Function at 0x413100
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
call dbg._fh_from_int
mov edx, eax
test eax, eax
je 0x41311c
cmp dword [eax], 0x42c1a8
je 0x413120
leave
ret
sub esp, 0xc
lea eax, [ebp - 4]
push 4
push eax
push 1
push 6
mov eax, dword [edx + 0xc]
push eax
call sub.WS2_32.DLL_setsockopt
add esp, 0xc
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 4
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push 0
push ecx
push edx
mov eax, dword [eax + 0xc]
push eax
call sub.WS2_32.DLL_send
mov ebx, eax
cmp eax, 0xffffffff
je 0x41356b
mov eax, ebx
mov ebx, dword [ebp - 4]
leave
ret
call dbg._socket_set_errno
jmp 0x413564

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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 4
mov eax, dword [ebp + 0x10]
push 0
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0xc]
push ebx
call sub.WS2_32.DLL_recv
mov ebx, eax
cmp eax, 0xffffffff
je 0x4135ab
mov eax, ebx
mov ebx, dword [ebp - 4]
leave
ret
call dbg._socket_set_errno
jmp 0x4135a4

Function at 0x413630
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x442f48]
test eax, eax
je 0x413644
leave
ret
lea eax, [ebp - 0x190]
push ecx
push ecx
push eax
push 0x202
call sub.WS2_32.DLL_WSAStartup
pop ecx
test eax, eax
pop edx
jne 0x413680
sub esp, 0xc
push dbg._cleanup_winsock
call dbg.atexit
mov dword [0x442f48], 1
add esp, 0x10
leave
ret
sub esp, 0xc
push str.adb:_could_not_initialize_Winsock_n
call dbg.fatal
add esp, 0x10
jmp 0x41365d
Function at 0x413730
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push esi
call sub.KERNEL32.dll_CreateFileA
mov esi, eax
pop ebx
xor eax, eax
cmp esi, 0xffffffff
je 0x413782
push ecx
push ecx
push 0
push esi
call sub.KERNEL32.dll_GetFileSize
xor ebx, ebx
mov edi, eax
pop eax
test edi, edi
pop edx
jne 0x413790
sub esp, 0xc
push esi
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [eax], edi
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
lea eax, [edi + 1]
push eax
call sym._malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x4137e1
sub esp, 0xc
lea eax, [ebp - 0x10]
push 0
push eax
push edi
push ebx
push esi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4137c2
cmp edi, dword [ebp - 0x10]
je 0x41376f
cmp byte [0x443b68], 0
js 0x41386e
sub esp, 0xc
xor edi, edi
push ebx
call sym._free
xor ebx, ebx
add esp, 0x10
jmp 0x41376f
cmp byte [0x443b68], 0
js 0x4137ee
xor edi, edi
jmp 0x41376f
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x28], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add eax, 0x40
push global___FUNCTION__.24
mov dword [ebp - 0x2c], eax
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
add esp, 0xc
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
push edi
mov edi, dword [ebp - 0x2c]
push str.load_file:_could_not_allocate__ld_bytes_n
push edi
call dbg.fprintf
pop ecx
mov edx, dword [ebp - 0x2c]
push edx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
xor edi, edi
call sym.__errno
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
jmp 0x41376f
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x24], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add eax, 0x40
push global___FUNCTION__.24
mov dword [ebp - 0x20], eax
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call dbg.fprintf
call sym.__errno
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x20]
push edi
push str.load_file:_could_not_read__ld_bytes_from__s_n
push eax
call dbg.fprintf
add esp, 0x14
mov eax, dword [ebp - 0x20]
push eax
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
jmp 0x4137cf
Function at 0x413fd0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov eax, 0x42c1a8
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov edi, dword [ebp + 0xc]
call dbg._fh_alloc
mov esi, eax
or eax, 0xffffffff
test esi, esi
je 0x4140d4
mov eax, dword [0x442f48]
test eax, eax
je 0x4140e0
sub esp, 0xc
mov eax, dword [ebp + 8]
and eax, 0xffff
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x20], 2
push eax
call sub.WS2_32.DLL_htons
mov word [addr.sin_family], ax
push 0
call sub.WS2_32.DLL_htonl
mov dword [ebp - 0x1c], eax
push eax
push eax
push 0
push edi
push 2
call sub.WS2_32.DLL_socket
add esp, 0x14
mov ebx, eax
cmp eax, 0xffffffff
je 0x414199
sub esp, 0xc
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 1
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push ebx
call sub.WS2_32.DLL_setsockopt
push eax
push eax
lea eax, [ebp - 0x20]
push 0x10
push eax
push ebx
call sub.WS2_32.DLL_bind
add esp, 0x14
test eax, eax
js 0x414199
mov edx, str.udp:
cmp edi, 1
je 0x414180
push eax
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, esi
push edx
call dbg._fh_to_int
push eax
lea eax, [esi + 0x18]
push str._d_any_server:_s_d_
push 0x20
push eax
call sym.___mingw_snprintf
add esp, 0x20
cmp byte [0x443b68], 0
js 0x4140f0
mov eax, esi
call dbg._fh_to_int
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg._init_winsock
jmp 0x414000
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x30], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.5
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call dbg.fprintf
call sym.__errno
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
mov eax, esi
call dbg._fh_to_int
add esp, 0x10
mov edx, 0x42bddc
dec edi
je 0x4141a8
sub esp, 0xc
mov edi, dword [ebp + 8]
push eax
push edx
push edi
push str.socket_inaddr_server:_port__d_type__s___fd__d_n
push ebx
call dbg.fprintf
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
jmp 0x4140cd
push eax
push eax
push 4
push ebx
call sub.WS2_32.DLL_listen
pop edx
test eax, eax
pop ecx
mov edx, 0x42bdc2
jns 0x4140a2
mov eax, esi
call dbg._fh_close
or eax, 0xffffffff
jmp 0x4140d4
mov edx, 0x42bde0
jmp 0x414144
Function at 0x4141b0
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov eax, 0x42c1a8
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [ebp + 0x10]
call dbg._fh_alloc
mov esi, eax
or eax, 0xffffffff
test esi, esi
je 0x4142bc
mov edx, dword [0x442f48]
test edx, edx
je 0x4142c4
sub esp, 0xc
mov eax, dword [ebp + 8]
push eax
call sub.WS2_32.DLL_gethostbyname
add esp, 0xc
mov ebx, eax
test eax, eax
je 0x414373
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov eax, dword [eax + 8]
sub esp, 0xc
mov word [ebp - 0x1c], ax
mov eax, dword [ebp + 0xc]
and eax, 0xffff
push eax
call sub.WS2_32.DLL_htons
mov word [addr.sin_family], ax
sub esp, 8
movsx eax, word [ebx + 0xa]
mov edx, dword [ebx + 0xc]
push eax
lea ecx, [ebp - 0x18]
mov eax, dword [edx]
push eax
push ecx
call sym._memcpy
add esp, 0x1c
push 0
push edi
movsx eax, word [ebx + 8]
push eax
call sub.WS2_32.DLL_socket
pop edx
cmp eax, 0xffffffff
je 0x414373
mov dword [esi + 0xc], eax
lea edx, [ebp - 0x1c]
push ebx
push 0x10
push edx
push eax
call sub.WS2_32.DLL_connect
pop ecx
test eax, eax
js 0x414373
mov eax, str.udp:
cmp edi, 1
je 0x414362
mov ebx, dword [ebp + 0xc]
push edx
push edx
push ebx
push eax
mov eax, esi
call dbg._fh_to_int
push eax
lea eax, [esi + 0x18]
push str._d_net_client:_s_d_
push 0x20
push eax
call sym.___mingw_snprintf
add esp, 0x20
cmp byte [0x443b68], 0
js 0x4142d0
mov eax, esi
call dbg._fh_to_int
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg._init_winsock
jmp 0x4141e1
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.6
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call dbg.fprintf
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov eax, esi
call dbg._fh_to_int
add esp, 0x10
mov edx, 0x42bddc
dec edi
je 0x41436c
push ecx
push ecx
push eax
mov eax, dword [ebp + 0xc]
push edx
push eax
mov eax, dword [ebp + 8]
push eax
push str.socket_network_client:_host__s_port__d_type__s___fd__d_n
push ebx
call dbg.fprintf
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x4142b5
mov eax, 0x42bdc2
jmp 0x41428a
mov edx, 0x42bde0
jmp 0x414324
mov eax, esi
call dbg._fh_close
or eax, 0xffffffff
jmp 0x4142bc
Function at 0x414390
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov eax, 0x42c1a8
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
call dbg._fh_alloc
mov ebx, eax
test eax, eax
jne 0x4143b4
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x442f48]
test eax, eax
je 0x4144a0
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], 0
and eax, 0xffff
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x20], 2
push eax
call sub.WS2_32.DLL_htons
mov word [addr.sin_family], ax
lea edi, [ebp - 0x20]
push 0x7f000001
call sub.WS2_32.DLL_htonl
mov dword [ebp - 0x1c], eax
push eax
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
push 2
call sub.WS2_32.DLL_socket
add esp, 0x14
mov esi, eax
cmp eax, 0xffffffff
je 0x4143a9
sub esp, 0xc
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x10]
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push esi
call sub.WS2_32.DLL_setsockopt
push eax
push eax
push 0x10
push edi
push esi
call sub.WS2_32.DLL_bind
add esp, 0x14
test eax, eax
js 0x41454c
mov edx, str.udp:
cmp dword [ebp + 0xc], 1
je 0x414533
push edi
push edi
mov esi, dword [ebp + 8]
mov eax, ebx
push esi
push edx
call dbg._fh_to_int
push eax
lea eax, [ebx + 0x18]
push str._d_lo_server:_s_d_
push 0x20
push eax
call sym.___mingw_snprintf
add esp, 0x20
cmp byte [0x443b68], 0
js 0x4144aa
mov eax, ebx
call dbg._fh_to_int
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call dbg._init_winsock
jmp 0x4143c1
call sym.__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add esi, 0x40
push global___FUNCTION__.32
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push esi
call dbg.fprintf
call sym.__errno
mov dword [eax], edi
mov eax, ebx
call dbg._fh_to_int
add esp, 0x10
mov edx, 0x42bddc
cmp dword [ebp + 0xc], 1
je 0x414560
sub esp, 0xc
push eax
push edx
mov ecx, dword [ebp + 8]
push ecx
push str.socket_loopback_server:_port__d_type__s___fd__d_n
push esi
call dbg.fprintf
add esp, 0x14
push esi
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], edi
jmp 0x414491
push edi
push edi
push 4
push esi
call sub.WS2_32.DLL_listen
pop edx
test eax, eax
pop ecx
mov edx, 0x42bdc2
jns 0x414466
mov eax, ebx
call dbg._fh_close
or eax, 0xffffffff
jmp 0x4143ac
mov edx, 0x42bde0
jmp 0x4144fb
Function at 0x414fe0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
lea eax, [ebp - 0x10]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
push 0
push eax
mov eax, dword [ebp + 0xc]
push edi
push eax
mov ebx, dword [esi + 0xc]
push ebx
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
test eax, eax
je 0x415029
cmp edi, dword [ebp - 0x10]
ja 0x415020
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esi + 8], 1
jmp 0x41500f
cmp byte [0x443b68], 0
js 0x415042
call sym.__errno
mov dword [eax], 5
or eax, 0xffffffff
jmp 0x415012
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.42
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call dbg.fprintf
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
lea eax, [esi + 0x18]
push eax
push edi
push str.adb_file_write:_could_not_write__d_bytes_from__s_n
push ebx
call dbg.fprintf
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x415032

Function at 0x4150c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
lea eax, [ebp - 0x10]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
push 0
push eax
mov eax, dword [ebp + 0xc]
push edi
push eax
mov eax, dword [esi + 0xc]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x415109
cmp edi, dword [ebp - 0x10]
ja 0x415100
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esi + 8], 1
jmp 0x4150ef
cmp byte [0x443b68], 0
js 0x415122
call sym.__errno
mov dword [eax], 5
or eax, 0xffffffff
jmp 0x4150f2
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.35
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call dbg.fprintf
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
lea eax, [esi + 0x18]
push eax
push edi
push str.adb_read:_could_not_read__d_bytes_from__s_n
push ebx
call dbg.fprintf
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x415112
Function at 0x4151d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov ebx, dword [eax + 0x20]
mov eax, dword [eax + 0xc]
and eax, 0xffff
push eax
push str.entryCount_d_n
push edi
call sym._fprintf_13
mov eax, dword [ebp + 0xc]
add esp, 0x10
cmp word [eax + 0xc], 0
je 0x41524b
xor esi, esi
push edi
push 8
push 1
push str.__file__
call sym._fwrite
push edi
push 1
inc esi
mov edx, dword [ebx]
push edx
mov eax, dword [ebx + 4]
push eax
call sym._fwrite
add esp, 0x20
push edi
push 2
push 1
push 0x42c2ec
call sym._fwrite
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
add esp, 0x10
and eax, 0xffff
mov ebx, dword [ebx + 0x18]
cmp eax, esi
jg 0x415205
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x41fa20
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x11c
mov ebx, dword [esp + 0x130]
call sym.__errno
test ebx, ebx
mov dword [eax], 0
je 0x41fbde
cmp byte [ebx], 0
je 0x41fba0
sub esp, 0xc
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
add esp, 0xc
cmp eax, 0xffffffff
je 0x41fbcc
test al, 0x10
je 0x41fba0
push eax
push 0x104
push ebx
lea edi, [esp + 0x24]
push edi
call sym.__fullpath
pop eax
mov ecx, edi
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x41fa7e
test edx, 0x8080
je 0x41fb92
add dl, dl
sbb ecx, 3
sub ecx, edi
lea eax, [ecx + 0x233]
push eax
call sym._malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x41fbba
lea esi, [eax + 0x22c]
mov ebp, eax
push eax
push eax
push edi
push esi
call sym._strcpy
add esp, 0x10
cmp byte [ebx + 0x22c], 0
jne 0x41fb44
sub esp, 0xc
push esi
call sym._strlen
add esp, 0xc
mov word [eax + esi], 0x2a
lea eax, [ebx + 0x120]
mov dword [ebx + 0x224], 0xffffffff
mov dword [ebx + 0x228], 0
mov dword [ebx + 0x118], 0
mov word [ebx + 0x11c], 0
mov word [ebx + 0x11e], 0
push 0x104
push 0
push eax
call sym._memset
add esp, 0x10
add esp, 0x11c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push esi
call sym._strlen
pop edx
pop ecx
push 0x2f
lea edi, [esi + eax - 1]
push esi
call sym._strrchr
add esp, 0x10
cmp eax, edi
je 0x41fadf
push eax
push eax
push 0x5c
push esi
call sym._strrchr
add esp, 0x10
cmp edi, eax
je 0x41fadf
sub esp, 0xc
push esi
call sym._strlen
add esp, 0x10
mov word [eax + esi], 0x5c
jmp 0x41fadf
shr edx, 0x10
add ecx, 2
jmp 0x41faa2
call sym.__errno
xor ebp, ebp
mov dword [eax], 0x14
add esp, 0x11c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
xor ebp, ebp
mov dword [eax], 0xc
jmp 0x41fb37
call sym.__errno
xor ebp, ebp
mov dword [eax], 2
jmp 0x41fb37
call sym.__errno
xor ebp, ebp
mov dword [eax], 0xe
jmp 0x41fb37