joyce8/EMBER2024-capa huggingface dataset:
Function at 0x517b20
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 1
lea ebx, [esp + 0x24]
mov dword [esp], str.Mingw_w64_runtime_failure:_n
add eax, 0x40
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
jmp fcn.00517b80

Function at 0x517b80
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x51b3a0]
test esi, esi
jle 0x517c73
mov edi, dword [0x51b3a4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x517bb4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x517c6c
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x517ba0
mov dword [esp], eax
mov esi, eax
call fcn.00518470
test eax, eax
mov edi, eax
je 0x517cb0
mov esi, dword [0x51b3a4]
lea ebx, [ebx + ebx*4]
shl ebx, 2
add esi, ebx
mov dword [esi + 0x10], eax
mov dword [esi], 0
call fcn.00518580
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 [0x51b3a4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x517c90
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x517c65
sub eax, 4
and eax, 0xfffffffb
je 0x517c65
add ebx, dword [0x51b3a4]
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 0x517c7a
add dword [0x51b3a0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
xor ebx, ebx
jmp 0x517bbe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00517b20
mov eax, dword [0x51b3a4]
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 fcn.00517b20
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00517b20
Function at 0x5180f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x51b3b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x51b3b0]
sub esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x518145
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 0x51813e
test esi, esi
je 0x51813e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x518120
mov dword [esp], 0x51b3b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x433002
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
je 0x433072
nop
nop
mov ebx, 0x40de38
nop
nop
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
pop eax
nop
nop
nop
mov esi, 0x45a742a4
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x433060
nop
nop
nop
mov eax, section..data
nop
nop
nop
cmp eax, 0
nop
je 0x4330d2
nop
nop
nop
nop
nop
mov ebx, 0x4304d8
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
sub ecx, eax
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
pop eax
mov esi, 0x16320c76
nop
nop
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x4330c0
nop
nop
nop
popal
nop
nop
jmp 0x431219
Function at 0x10001100
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
push ebp
mov ebp, dword [esp + 0x110]
push esi
push edi
mov edi, dword [sym.imp.MSVCRT.dll_getenv]
push ebp
call edi
mov esi, eax
add esp, 4
test esi, esi
je 0x1000125f
push 0xff
lea eax, [esp + 0x18]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
lea ecx, [esp + 0x18]
mov byte [esp + 0x11f], 0
push ecx
push esi
mov dword [esp + 0x24], 0
call fcn.100012e0
add esp, 0x14
test eax, eax
jl 0x1000125f
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x1000125f
test eax, eax
jne 0x100011c3
mov esi, dword [esp + 0x11c]
push esi
call edi
add esp, 4
test eax, eax
jne 0x100011ac
mov edx, dword [esp + 0x10]
push edx
push 1
call fcn.10001290
push esi
push str.0100_getenv_error:__s
push str.CLI0107
push 2
call fcn.1000da50
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebp
add esp, 0x108
ret
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov ecx, dword [esp + 0x14]
add esp, 4
mov edx, dword [ecx + 4]
mov dword [edx + 0x100], eax
mov eax, dword [0x10022dd0]
test eax, eax
jne 0x100011e7
call dword [sym.imp.MSVCRT.dll__getpid]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov eax, dword [0x10022dd0]
add esp, 4
inc eax
mov dword [0x10022dd0], eax
mov eax, dword [esp + 0xc]
xor esi, esi
test eax, eax
jle 0x10001210
mov eax, dword [esp + 0x10]
lea ecx, [eax + esi*8]
push ecx
call fcn.100016a0
mov edi, eax
add esp, 4
test edi, edi
jge 0x10001241
mov eax, dword [esp + 0xc]
inc esi
cmp esi, eax
jl 0x100011f1
mov ecx, dword [esp + 0x10]
push ecx
push eax
call fcn.10001290
lea edx, [esp + 0x1c]
push edx
push str.3003_cant_connect_to_server:__s
push str.CLI0108
push 2
call fcn.1000d9f0
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebp
add esp, 0x108
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
push edx
push eax
call fcn.10001290
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x108
ret
push ebp
push str.0100_getenv_error:__s
push str.CLI0106
push 2
call fcn.1000da50
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebp
add esp, 0x108
ret
Function at 0x10001720
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push str.TMAX_CONNECT_TIMEOUT
call dword [sym.imp.MSVCRT.dll_getenv]
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
jne 0x1000174f
xor edi, edi
mov dword [esp + 0x10], ebx
xor esi, esi
mov dword [esp + 0x14], 0xa
jmp 0x10001792
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_time]
push esi
call dword [sym.imp.MSVCRT.dll_atof]
fld st(0)
add esp, 8
call sub.MSVCRT.dll__ftol
mov esi, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], esi
fild dword [esp + 0x18]
fsubr st(1)
fmul qword [0x1001a148]
call sub.MSVCRT.dll__ftol
fstp st(0)
mov edi, eax
mov dword [esp + 0x14], 0x64
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], ebx
cmp eax, ebx
jle 0x10001837
mov ebx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
call dword [sym.imp.MSVCRT.dll__errno]
cmp esi, 0x3c
mov dword [eax], 0
jle 0x10001800
mov esi, 0x3c
push edi
push esi
push ebx
push 0
push ebp
call fcn.1000d7a0
add esp, 0x14
test eax, eax
jge 0x1000183a
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x10001816
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.MSVCRT.dll_time]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
sub esi, edx
add esi, ecx
add esp, 4
test esi, esi
jle 0x10001837
xor edi, edi
jmp 0x1000181a
test esi, esi
jg 0x100017c0
test edi, edi
jg 0x100017c0
push ebx
push 0
push ebp
call fcn.1000d6d0
add esp, 0xc
jmp 0x100017ce
test edi, edi
jg 0x10001837
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x100017aa
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x10005d90
Capabilities:
Get socket status

Disassembly:
mov eax, 0x100c
call fcn.10019c40
mov eax, dword [0x10025278]
push ebx
push esi
push edi
test eax, eax
jl 0x10005e05
mov edi, dword [esp + 0x101c]
mov esi, dword [sym.imp.MSVCRT.dll__errno]
mov ebx, dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], 1
call esi
mov dword [eax], 0
mov edx, dword [0x10025278]
lea eax, [esp + 0xc]
lea ecx, [esp + 0x14]
push eax
push 0
push 0
inc edx
push ecx
push edx
call ebx
test eax, eax
jge 0x10005e33
call esi
cmp dword [eax], 4
jne 0x10005e12
mov eax, dword [0x10025278]
test eax, eax
jge 0x10005db9
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x100c
ret
push str.0080_select_error
push str.CSC1226
push 2
call fcn.1000d9f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x100c
ret
xor ecx, ecx
pop edi
test eax, eax
setne cl
pop esi
mov eax, ecx
pop ebx
add esp, 0x100c
ret
Function at 0x10008830
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push esi
push str.tpgetsockname__x___x_
push 1
push 1
push str.tpgetsockname
call fcn.10011640
mov eax, dword [0x10025200]
add esp, 0x18
test eax, eax
mov dword [0x100251a4], 0
jne 0x10008888
push 0
call sym.tmax.dll_tpstart
add esp, 4
test eax, eax
jge 0x10008888
mov eax, dword [0x100251a4]
push eax
call sym.tmax.dll_tpstrerror
mov ecx, dword [0x100251a4]
push eax
push ecx
jmp 0x100088e7
test esi, esi
je 0x100088ce
test edi, edi
je 0x100088ce
mov eax, dword [0x10025278]
lea edx, [esp + 0x10]
push edx
push esi
push eax
mov dword [esp + 0x1c], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [esp + 0x10]
mov esi, eax
push esi
push str.tpgetsockname___d
push 2
push 1
push str.tpgetsockname
mov dword [edi], ecx
call fcn.10011640
add esp, 0x14
mov eax, esi
pop edi
pop esi
ret
push 4
mov dword [0x100251a4], 4
call sym.tmax.dll_tpstrerror
mov edx, dword [0x100251a4]
push eax
push edx
push str.tpgetsockname___1___d_:__s_
push 4
push 1
push str.tpgetsockname
call fcn.10011640
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
ret

Function at 0x10008960
Capabilities:
Get socket status

Disassembly:
mov eax, 0x1004
call fcn.10019c40
push esi
mov esi, dword [esp + 0x100c]
push esi
push str.tpsleep__x_
push 1
push 1
push str.tpsleep
call fcn.10011640
mov eax, dword [0x10025200]
add esp, 0x14
test eax, eax
mov dword [0x100251a4], 0
jne 0x100089de
push 0
call sym.tmax.dll_tpstart
add esp, 4
test eax, eax
jge 0x100089de
mov eax, dword [0x100251a4]
push eax
call sym.tmax.dll_tpstrerror
mov ecx, dword [0x100251a4]
push eax
push ecx
push str.tpsleep___1___d_:__s_
push 4
push 1
push str.tpsleep
call fcn.10011640
add esp, 0x1c
or eax, 0xffffffff
pop esi
add esp, 0x1004
ret
mov eax, dword [0x10025278]
push esi
mov dword [esp + 0xc], eax
push 0
lea edx, [esp + 0xc]
push 0
inc eax
push edx
push eax
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
push esi
push str.tpsleep___d
push 2
push 1
push str.tpsleep
call fcn.10011640
add esp, 0x14
mov eax, esi
pop esi
add esp, 0x1004
ret
Function at 0x10008a50
Capabilities:
Inspect section memory permissions
Query environment variable

Disassembly:
mov eax, dword [0x1001cbd0]
test eax, eax
jl 0x10008a63
push eax
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
or eax, 0xffffffff
push str.TMAX_SEMANTICS
mov dword [0x1001cbcc], eax
mov dword [0x1001cbd0], eax
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x10008a87
jmp 0x100106b0
ret
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x10010651
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x1001066f
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x100106cd
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x100106b4
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x100106bd
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x100106c7
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x100106a9
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x10010633
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x1001071a
dec eax
je 0x10010711
sub eax, 3
je 0x10010708
mov dword [ebp - 4], 0x40
jmp 0x10010737
mov dword [ebp - 4], 4
jmp 0x1001071d
mov dword [ebp - 4], 0x20
jmp 0x1001071d
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x10010769
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x100106e9
mov eax, dword [ebp - 0x88]
mov edi, dword [eax + 0x28]
add edi, esi
call fcn.1000ff7a
mov word [ebx], es
pushfd
invalid
Function at 0x10009790
Capabilities:
Query environment variable

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x100097b7
cmp byte [esi], 0
je 0x100097b7
push esi
push str.tpgetenv___s__
push 1
push 1
push str.tpgetenv
call fcn.10011640
add esp, 0x14
jmp 0x100097cd
push str.tpgetenv____
push 1
push 1
push str.tpgetenv
call fcn.10011640
add esp, 0x10
push esi
mov dword [0x100251a4], 0
call dword [sym.imp.MSVCRT.dll_getenv]
mov esi, eax
push esi
push str.tpgetenv___x
push 2
push 1
push str.tpgetenv
call fcn.10011640
add esp, 0x18
mov eax, esi
pop esi
ret

Function at 0x10009db0
Capabilities:
Get socket status

Disassembly:
mov eax, 0x100c
call fcn.10019c40
push esi
push edi
mov edi, dword [esp + 0x1018]
push edi
push str.tmax_chk_conn__d_
push 1
push 1
push str.tmax_chk_conn
call fcn.10011640
mov eax, dword [0x10025200]
add esp, 0x14
test eax, eax
jne 0x10009df1
mov dword [0x100251a4], 9
push 9
jmp 0x10009e52
test edi, edi
jl 0x10009e82
jne 0x10009ef5
call dword [sym.imp.MSVCRT.dll__errno]
mov dword [eax], 0
mov eax, dword [0x10025278]
lea ecx, [esp + 8]
mov dword [esp + 0x14], eax
push ecx
push 0
lea edx, [esp + 0x18]
push 0
inc eax
push edx
push eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jge 0x10009e80
mov dword [0x100251a4], 0xc
push 0xc
call sym.tmax.dll_tpstrerror
push eax
mov eax, dword [0x100251a4]
push eax
push str.tmax_chk_conn___1___d_:__s_
push 4
push 1
push str.tmax_chk_conn
call fcn.10011640
add esp, 0x1c
or eax, 0xffffffff
pop edi
pop esi
add esp, 0x100c
ret
jne 0x10009ea3
push str.tmax_chk_conn__0
push 2
push 1
push str.tmax_chk_conn
call fcn.10011640
add esp, 0x10
xor eax, eax
pop edi
pop esi
add esp, 0x100c
ret
mov edx, dword [0x10025278]
lea ecx, [esp + 0x10]
push ecx
push edx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x10009e82
push 0
push 0
call fcn.1000b650
add esp, 8
test eax, eax
je 0x10009e46
push 0
push eax
call fcn.1000c020
push str.tmax_chk_conn__0
push 2
push 1
push str.tmax_chk_conn
call fcn.10011640
add esp, 0x18
xor eax, eax
pop edi
pop esi
add esp, 0x100c
ret
push 0
push 3
call sym.tmax.dll__header_msg_make
mov esi, eax
add esp, 8
test esi, esi
jne 0x10009f1d
pop edi
mov dword [0x100251a4], 7
or eax, 0xffffffff
pop esi
add esp, 0x100c
ret
mov edx, dword [str..CHK_CONN]
lea ecx, [esi + 0x44]
push 0
mov dword [ecx], edx
mov eax, dword [0x1001d1d0]
mov dword [ecx + 4], eax
mov dx, word [0x1001d1d4]
mov word [ecx + 8], dx
mov ecx, dword [0x100251e4]
inc ecx
mov dword [0x100251e4], ecx
call fcn.100060b0
push 0
push esi
mov dword [esi + 4], eax
mov dword [esi + 0x58], 8
call fcn.1000b200
add esp, 0xc
test eax, eax
jge 0x10009f7e
pop edi
mov dword [0x100251a4], 0xc
or eax, 0xffffffff
pop esi
add esp, 0x100c
ret
push 0
push edi
push esi
call fcn.1000b4c0
add esp, 0xc
test eax, eax
jne 0x10009fa4
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
add esp, 0x100c
ret
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x100c
ret
Function at 0x1000c930
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
test esi, esi
push edi
jle 0x1000c996
mov ebx, dword [esp + 0x14]
mov ebp, dword [sym.imp.WS2_32.dll_recv]
mov edi, dword [esp + 0x18]
push 0
push esi
push edi
push ebx
call ebp
test eax, eax
jge 0x1000c98c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2746
je 0x1000c996
cmp eax, 0x2733
jne 0x1000c9b5
cmp esi, dword [esp + 0x1c]
je 0x1000c9a1
mov eax, dword [0x100251d4]
test eax, eax
jle 0x1000c992
mov ecx, dword [esp + 0x20]
push ecx
push eax
call fcn.10005d90
add esp, 8
test eax, eax
je 0x1000c9ab
jmp 0x1000c992
je 0x1000c996
sub esi, eax
add edi, eax
test esi, esi
jg 0x1000c94a
mov eax, dword [esp + 0x1c]
pop edi
sub eax, esi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
ret
pop edi
pop esi
pop ebp
mov eax, 0xfffffff4
pop ebx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
push ebp
push esi
test eax, eax
push edi
mov esi, eax
jle 0x1000c9f3
mov ebx, dword [esp + 0x14]
mov ebp, dword [sym.imp.WS2_32.dll_send]
mov edi, dword [esp + 0x18]
push 0
push esi
push edi
push ebx
call ebp
test eax, eax
jle 0x1000c9f5
sub esi, eax
add edi, eax
test esi, esi
jg 0x1000c9dc
mov eax, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x1000d220
Capabilities:
Create directory

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x200
test edx, edx
push ebx
push esi
push edi
jne 0x1000d23e
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x200
ret
cmp byte [edx], 0
jne 0x1000d250
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x200
ret
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
dec ecx
js 0x1000d296
mov al, byte [esp + ecx + 0xc]
cmp al, 0x2f
je 0x1000d28e
cmp al, 0x5c
jne 0x1000d296
mov byte [esp + ecx + 0xc], 0
dec ecx
jns 0x1000d282
mov ebx, dword [sym.imp.MSVCRT.dll__mkdir]
lea ecx, [esp + 0xc]
push ecx
call ebx
mov esi, eax
add esp, 4
test esi, esi
jge 0x1000d348
call dword [sym.imp.MSVCRT.dll__errno]
cmp dword [eax], 2
jne 0x1000d348
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
dec eax
test eax, eax
jle 0x1000d2f8
mov cl, byte [esp + eax + 0xc]
cmp cl, 0x2f
je 0x1000d2f4
cmp cl, 0x5c
je 0x1000d2f4
dec eax
test eax, eax
jg 0x1000d2d4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x200
ret
test eax, eax
jg 0x1000d305
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x200
ret
mov ecx, eax
lea esi, [esp + 0xc]
mov edx, ecx
lea edi, [esp + 0x10c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x10c], 0
lea eax, [esp + 0x10c]
push eax
call fcn.1000d220
add esp, 4
test eax, eax
jl 0x1000d34a
lea ecx, [esp + 0xc]
push ecx
call ebx
add esp, 4
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x200
ret

Function at 0x1000d360
Capabilities:
Initialize winsock library

Disassembly:
mov eax, dword [0x1002518c]
sub esp, 0x190
test eax, eax
jne 0x1000d3c9
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1000d39e
push str.0060_Winsock_startup_error
push str.COM3406
push 2
call fcn.1000d9f0
add esp, 0xc
or eax, 0xffffffff
add esp, 0x190
ret
mov ax, word [esp]
cmp al, 2
jne 0x1000d3d5
xor ecx, ecx
mov cl, ah
test cl, cl
jne 0x1000d3d5
push 0x10022df4
push 0
mov dword [0x1002518c], 1
call dword [sym.imp.MSVCRT.dll_setlocale]
add esp, 8
mov eax, 1
add esp, 0x190
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
push str.0061_Winsock_version_check_error
push str.COM3411
push 2
call fcn.1000d9f0
add esp, 0xc
or eax, 0xffffffff
add esp, 0x190
ret
Function at 0x1000d680
Capabilities:
Resolve dns

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x1000d6c6
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x1000d6a5
or eax, 0xffffffff
pop esi
ret
movsx ecx, word [eax + 0xa]
mov eax, dword [eax + 0xc]
mov edx, ecx
push edi
lea edi, [esp + 0xc]
mov esi, dword [eax]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0xc]
pop edi
pop esi
ret

Function at 0x1000d6d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
sub esp, 0x10
push esi
call fcn.1000d360
test eax, eax
jl 0x1000d798
mov ecx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 4], eax
push ecx
mov dword [esp + 0xc], eax
mov word [esp + 8], 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 6], ax
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x1000d717
test eax, eax
jne 0x1000d729
mov esi, dword [esp + 0x18]
push esi
call fcn.1000d680
add esp, 4
cmp eax, 0xffffffff
je 0x1000d783
push 0
push 1
push 2
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
jge 0x1000d75b
push str.0040_socket_init_error
push str.COM3413
push 2
call fcn.1000d9f0
add esp, 0xc
or eax, 0xffffffff
pop esi
add esp, 0x10
ret
lea edx, [esp + 4]
push 0x10
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jl 0x1000d774
mov eax, esi
pop esi
add esp, 0x10
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop esi
add esp, 0x10
ret
push esi
push str.0063_host_name_error:__s
push str.COM3412
push 2
call fcn.1000d9f0
add esp, 0x10
or eax, 0xffffffff
pop esi
add esp, 0x10
ret