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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x424715
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll_protected:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pnavail_void_const]
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x424780
jg 0x42473b
test esi, esi
je 0x424780
test ecx, ecx
jl 0x4247ba
jg 0x424745
test eax, eax
je 0x4247ba
cmp edi, ecx
jg 0x424755
jl 0x42474f
cmp esi, eax
jae 0x424755
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pptr_void_const]
push dword [ebp + 0x10]
push dword [ebp + 8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp + 0x10]
add esp, 0xc
add dword [ebp + 8], ecx
sub esi, ecx
sbb edi, dword [ebp - 4]
push ecx
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::pbump_int_]
mov eax, dword [ebp + 8]
test edi, edi
jl 0x4247a7
jg 0x42478d
test esi, esi
je 0x4247a7
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x4247a7
push ecx
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 8]
jmp 0x42478d
Function at 0x4363a0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48e2c8
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], Ordinal_5
mov dword [esi + 8], 0xffffffff
mov dword [esi + 0xc], 0xffffffff
mov dword [ebp - 4], 0
mov dword [esi + 0x28], vtable.SignalIn_enum_DecoderSignals_.0
lea ecx, [esi + 0x60]
mov byte [ebp - 4], 1
mov dword [esi], vtable.AIS::Decoder.0
mov dword [esi + 0x28], vtable.AIS::Decoder.1.0
mov byte [esi + 0x2c], 0x3f
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0x400
mov dword [esi + 0x38], 4
mov byte [esi + 0x3c], 1
mov dword [esi + 0x40], 0
mov word [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
call fcn.00437110
mov dword [esi + 0x120], 0
mov eax, esi
mov dword [esi + 0x124], 0
mov dword [esi + 0x128], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x453dc0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push dword [ebp + 0xc]
mov ebx, ecx
push dword [ebp + 8]
lea esi, [ebx + 0xa8]
push esi
call sub.airspyhf.dll_airspyhf_open_sn
add esp, 0xc
test eax, eax
jne 0x453ef4
push eax
lea eax, [ebp - 8]
push eax
push dword [esi]
call sub.airspyhf.dll_airspyhf_get_samplerates
mov esi, dword [ebp - 8]
add esp, 0xc
test esi, esi
jne 0x453e07
push str.AIRSPY:_cannot_get_allowed_sample_rates.
jmp 0x453ef9
mov eax, dword [ebx + 0xb0]
mov ecx, eax
mov edx, dword [ebx + 0xac]
sub ecx, edx
push edi
lea edi, [ebx + 0xac]
sar ecx, 2
mov dword [ebp - 0xc], eax
cmp esi, ecx
jae 0x453e2d
lea eax, [edx + esi*4]
jmp 0x453e67
jbe 0x453e6a
mov eax, dword [edi + 8]
sub eax, edx
sar eax, 2
cmp esi, eax
jbe 0x453e4c
lea eax, [ebp - 1]
mov ecx, edi
push eax
push esi
call fcn.004534b0
mov esi, dword [ebp - 8]
jmp 0x453e6a
sub esi, ecx
shl esi, 2
push esi
push 0
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0xc]
add esp, 0xc
add eax, esi
mov esi, dword [ebp - 8]
mov dword [edi + 4], eax
push esi
push dword [edi]
push dword [ebx + 0xa8]
call sub.airspyhf.dll_airspyhf_get_samplerates
mov eax, dword [edi]
add esp, 0xc
mov esi, dword [ebx + 0xb0]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], esi
mov ecx, dword [eax]
mov edx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
cmp eax, esi
je 0x453ed1
mov edi, dword [eax]
mov ecx, ebx
mov eax, dword [ebx]
mov esi, edx
call dword [eax + 0x20]
mov ecx, edi
sub ecx, eax
mov eax, ecx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0xc]
cmp eax, edx
cmovl edx, eax
cmp eax, esi
mov eax, dword [ebp - 0x14]
cmovge edi, dword [ebp - 0x10]
add eax, 4
mov ecx, edi
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x18]
jne 0x453e97
mov eax, dword [ebx]
push ecx
mov ecx, ebx
call dword [eax + 0x18]
mov eax, dword [ebp + 8]
pop edi
mov dword [ebx + 0xc0], eax
mov eax, dword [ebp + 0xc]
pop esi
mov dword [ebx + 0xc4], eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.AIRSPYHF:_cannot_open_device
lea ecx, [ebp - 0x24]
call fcn.00419540
push 0x4abd04
lea eax, [ebp - 0x24]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x4554a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4911fd
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x10
call fcn.00489a19
mov edx, eax
add esp, 4
test edx, edx
je 0x4554ee
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx]
mov dword [edx], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
jmp 0x4554f0
xor edx, edx
mov dword [ebp + 0xc], edx
lea edi, [esi + 4]
mov dword [ebp - 4], 0
push edi
push 0
push edx
push 0x42b020
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esi], eax
test eax, eax
je 0x45552e
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
push 6
mov dword [edi], 0
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x456fe0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4913ed
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], ebx
cvttss2si eax, dword [ebp + 8]
push 1
push dword [ebx + 0xa8]
lea eax, [eax + eax*4]
add eax, eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.rtlsdr.dll_rtlsdr_set_tuner_gain_mode]
add esp, 8
test eax, eax
jne 0x4571a7
push eax
push dword [ebx + 0xa8]
call dword [sym.imp.rtlsdr.dll_rtlsdr_get_tuner_gains]
add esp, 8
test eax, eax
jg 0x457051
push str.RTLSDR:_no_gains_available
jmp 0x4571ac
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
cmp eax, 0x3fffffff
ja 0x4571c2
lea esi, [eax*4]
test esi, esi
jne 0x457083
xor edi, edi
mov dword [ebp + 8], edi
jmp 0x4570c3
cmp esi, 0x1000
jb 0x4570b5
lea eax, [esi + 0x23]
cmp eax, esi
jbe 0x4571c7
push eax
call fcn.00489a19
add esp, 4
test eax, eax
je 0x457183
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [ebp + 8], edi
mov dword [edi - 4], eax
jmp 0x4570c3
push esi
call fcn.00489a19
add esp, 4
mov dword [ebp + 8], eax
mov edi, eax
push esi
push 0
lea ebx, [esi + edi]
mov dword [ebp - 0x28], edi
push edi
mov dword [ebp - 0x20], ebx
call sub.VCRUNTIME140.dll_memset
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp - 0x1c]
push edi
mov dword [ebp - 4], 0
push dword [eax + 0xa8]
call dword [sym.imp.rtlsdr.dll_rtlsdr_get_tuner_gains]
mov eax, dword [edi]
add esp, 0x14
mov dword [ebp - 0x10], eax
mov ecx, edi
mov dword [ebp - 0x18], edi
cmp edi, ebx
je 0x457136
mov edi, eax
mov esi, dword [ecx]
mov eax, esi
sub eax, dword [ebp - 0x14]
cdq
mov ecx, eax
mov eax, dword [ebp - 0x14]
xor ecx, edx
sub eax, edi
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp ecx, eax
mov ecx, dword [ebp - 0x18]
cmovge esi, edi
add ecx, 4
mov dword [ebp - 0x18], ecx
mov edi, esi
cmp ecx, ebx
jne 0x457102
mov dword [ebp - 0x10], edi
mov eax, esi
mov edi, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x1c]
push dword [eax + 0xa8]
call dword [sym.imp.rtlsdr.dll_rtlsdr_set_tuner_gain]
add esp, 8
test eax, eax
je 0x457164
push str.RTLSDR:_cannot_set_tuner_gain.
lea ecx, [ebp - 0x34]
call fcn.00419540
push 0x4abd04
lea eax, [ebp - 0x34]
jmp 0x4571bc
sub ebx, edi
mov eax, edi
and ebx, 0xfffffffc
cmp ebx, 0x1000
jb 0x457189
mov edi, dword [eax - 4]
add ebx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x457189
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ebx
push edi
call fcn.00489a49
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push str.RTLSDR:_cannot_set_gain_mode.
lea ecx, [ebp - 0x28]
call fcn.00419540
push 0x4abd04
lea eax, [ebp - 0x28]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call fcn.00421180
call fcn.00421120
int3
Function at 0x457490
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
mov eax, dword [esi + 0x2c]
lea edx, [esi + 0x28]
mov ecx, eax
mov dword [ebp - 0x10], esi
sub ecx, dword [edx]
push edi
mov edi, dword [ebp + 0xc]
sar ecx, 2
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
cmp ecx, edi
jae 0x4574f7
mov eax, dword [edx + 8]
sub eax, dword [edx]
sar eax, 2
cmp edi, eax
jbe 0x4574d4
lea eax, [ebp - 1]
mov ecx, edx
push eax
push edi
call fcn.004573e0
mov edx, dword [ebp - 0xc]
jmp 0x4574f7
mov esi, edi
sub esi, ecx
shl esi, 2
push esi
push 0
push dword [ebp - 8]
call sub.VCRUNTIME140.dll_memset
mov edx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ebp - 8]
add eax, esi
mov esi, dword [ebp - 0x10]
mov dword [edx + 4], eax
mov dword [ebp - 8], 0
test edi, edi
jle 0x457596
movss xmm6, dword [0x4a2a00]
movss xmm7, dword [0x4a29c0]
mov ecx, dword [ebp + 8]
nop dword [eax]
movss xmm4, dword [esi + 0x38]
movss xmm5, dword [esi + 0x34]
xorps xmm4, xmm6
movaps xmm1, xmm5
mov eax, dword [edx]
mulss xmm1, dword [ecx + 4]
movaps xmm0, xmm4
mov edi, dword [ebp - 8]
mulss xmm0, dword [ecx]
mulss xmm5, dword [ecx]
mulss xmm4, dword [ecx + 4]
addss xmm1, xmm0
subss xmm5, xmm4
movss dword [ebp - 0x10], xmm1
fld dword [ebp - 0x10]
movss dword [ebp - 0x10], xmm5
fld dword [ebp - 0x10]
fpatan
fstp dword [ebp - 0x10]
movss xmm0, dword [ebp - 0x10]
mulss xmm0, xmm7
movss dword [eax + edi*4], xmm0
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [esi + 0x34], eax
mov eax, edi
mov edi, dword [ebp + 0xc]
inc eax
mov dword [esi + 0x38], ecx
mov ecx, dword [ebp + 8]
add ecx, 8
mov dword [ebp - 8], eax
mov dword [ebp + 8], ecx
cmp eax, edi
jl 0x457520
push dword [ebp + 0x10]
lea ecx, [esi + 0x10]
push edi
push dword [edx]
call fcn.00457e90
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4674b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4992cd
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov byte [esi + 0x8c], 1
call fcn.004678d0
push 0x10
mov byte [esi + 0xe0], 0
call fcn.00489a19
add esp, 4
test eax, eax
je 0x46750b
mov dword [eax], esi
mov dword [eax + 8], 0x467580
mov dword [eax + 0xc], 0
jmp 0x46750d
xor eax, eax
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0
push ecx
push 0
push eax
push 0x42b020
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
mov ecx, eax
add esp, 0x18
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x46756f
cmp dword [esi + 0xe8], 0
je 0x467548
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
mov eax, dword [ebp - 0x14]
push 0xa
mov dword [esi + 0xe4], ecx
mov dword [esi + 0xe8], eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
push 6
mov dword [ebp - 0x14], 0
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x4678d0
Capabilities:
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x30], 0
cmp dword [edi + 0xbc], 0xf
lea esi, [edi + 0xa8]
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
movlpd qword [ebp - 0x20], xmm0
mov edx, esi
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x28], 2
mov dword [ebp - 0x24], 0x11
jbe 0x467916
mov edx, dword [esi]
cmp dword [edi + 0xd4], 0xf
push ebx
lea ebx, [edi + 0xc0]
mov ecx, ebx
jbe 0x46792a
mov ecx, dword [ebx]
lea eax, [edi + 0xd8]
push eax
lea eax, [ebp - 0x30]
push eax
push edx
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x467a5b
mov eax, dword [edi + 0xd8]
test eax, eax
je 0x467a5b
push 0
push 2
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0xdc], eax
cmp eax, 0xffffffff
je 0x467a5b
lea ecx, [ebp - 4]
mov dword [ebp - 4], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [edi + 0xd8]
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [edi + 0xdc]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x467a15
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push 0x49f6f0
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push 0x49d760
push esi
push str._port
push ebx
push str.UDP:_binding_to
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
push eax
call fcn.00415680
add esp, 8
push eax
call fcn.004156b0
add esp, 8
push eax
call fcn.00415680
add esp, 8
push eax
call fcn.004156b0
add esp, 8
push eax
call fcn.004156b0
add esp, 8
push eax
call fcn.004156b0
add esp, 8
push str.UDP:_cannot_bind_to_port.
jmp 0x467a60
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.UDP:_server_opened_at_port
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
mov ecx, esi
cmp dword [esi + 0x14], 0xf
jbe 0x467a3a
mov ecx, dword [esi]
push dword [esi + 0x10]
push ecx
push eax
call fcn.00416020
add esp, 0xc
mov ecx, eax
push 0x416670
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push str.UDP:_cannot_create_socket.
lea ecx, [ebp - 0x10]
call fcn.00419540
push 0x4abd04
lea eax, [ebp - 0x10]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3
Function at 0x4702d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
xor esi, esi
add ebx, 0xfffffffd
push edi
mov edi, dword [ebp + 0x1c]
lea ecx, [esi + 1]
cmp ebx, ecx
jbe 0x470304
nop dword [eax + eax]
cmp edi, 0xf
lea eax, [ebp + 8]
cmova eax, edx
movsx eax, byte [eax + ecx]
inc ecx
xor esi, eax
cmp ecx, ebx
jb 0x4702f0
cmp edi, 0xf
jbe 0x470334
inc edi
mov eax, edx
cmp edi, 0x1000
jb 0x47032a
mov edx, dword [eax - 4]
add edi, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x47032a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edi
push edx
call fcn.00489a49
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 0x18
Function at 0x476a20
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48e54d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push esi
mov dword [ebp - 0x10], esi
call sub.MSVCP140.dll__Mtx_lock
add esp, 4
test eax, eax
jne 0x476b2d
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
je 0x476b34
mov edx, dword [esi + 0x30]
mov dword [ebp - 4], 0
cmp edx, 0xffffffff
je 0x476aec
mov eax, dword [esi + 0x4c]
xor ecx, ecx
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
cmp eax, dword [esi + 0x50]
jne 0x476b0f
push ecx
push ebx
push edi
push edx
call dword [sym.imp.WS2_32.dll_send]
mov ecx, eax
test ecx, ecx
jns 0x476b0f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x476b0d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push 0x416670
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push str.TCP_Connection:_error_message_to_client:
push dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.004156b0
add esp, 8
push eax
call fcn.004156b0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, esi
call fcn.00476370
xor bl, bl
push esi
call sub.MSVCP140.dll__Mtx_unlock
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor ecx, ecx
cmp ecx, ebx
jge 0x476b29
lea eax, [ecx + edi]
sub edi, eax
sub edi, ecx
lea ecx, [esi + 0x4c]
add edi, ebx
push edi
push eax
push dword [esi + 0x50]
call fcn.00472da0
mov bl, 1
jmp 0x476aee
push 5
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
dec eax
push 6
mov dword [esi + 0x2c], eax
call sub.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_
int3
Function at 0x476b50
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49a225
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4d04c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp + 8]
mov dword [ebp - 4], 1
push eax
mov dword [ebp - 0x10], 0
call fcn.0041c160
lea eax, [ebp + 0x20]
push eax
lea ecx, [edi + 0x18]
call fcn.0041c160
cmp dword [ebp + 0x34], 0xf
lea edx, [ebp - 0x10]
mov al, byte [ebp + 0x38]
lea ecx, [ebp + 0x20]
cmova ecx, dword [ebp + 0x20]
xorps xmm0, xmm0
cmp dword [ebp + 0x1c], 0xf
mov ebx, dword [ebp + 0x3c]
push edx
mov byte [edi + 0x30], al
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp + 8]
mov dword [edi + 0x38], ebx
cmova eax, dword [ebp + 8]
push ecx
push eax
mov dword [ebp - 0x34], 0
movlpd qword [ebp - 0x24], xmm0
movlpd qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x28], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x476c27
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x476c27
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi + 0x40], eax
cmp eax, 0xffffffff
jne 0x476ca3
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
xor bl, bl
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x476c59
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x476c4f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x476c9d
push ecx
push edx
call fcn.00489a49
add esp, 8
mov ecx, dword [ebp + 0x34]
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 0xf
mov byte [ebp + 8], 0
cmp ecx, 0xf
jbe 0x476d31
mov edx, dword [ebp + 0x20]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x476d27
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x476d27
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp byte [edi + 0x30], 0
je 0x476cc0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov dword [edi + 0x48], eax
add esp, 4
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x4c], edx
push dword [eax + 0x10]
push dword [eax + 0x18]
push dword [edi + 0x40]
call dword [sym.imp.WS2_32.dll_connect]
push dword [ebp - 0x10]
mov esi, eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, 0xffffffff
je 0x476d01
mov dword [edi + 0x44], 2
mov bl, 1
jmp 0x476c29
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, edi
cmp eax, 0x2733
je 0x476d1a
call fcn.00476d50
jmp 0x476c27
push ebx
call fcn.00476d80
mov bl, al
jmp 0x476c29
push ecx
push edx
call fcn.00489a49
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x3c
Function at 0x476d80
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x4d04c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x44], 2
je 0x476e42
mov ecx, dword [esi + 0x40]
cmp ecx, 0xffffffff
je 0x476e5c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x21c]
push eax
push 0
lea eax, [ebp - 0x108]
mov dword [ebp - 0x208], ecx
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x20c], 1
push eax
lea eax, [ecx + 1]
mov dword [ebp - 0x104], ecx
push eax
mov dword [ebp - 0x108], 1
mov dword [ebp - 0x218], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x476e55
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], 4
push eax
lea eax, [ebp - 0x214]
push eax
push 0x1007
push 0xffff
push dword [esi + 0x40]
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [ebp - 0x214], 0
jne 0x476e5c
inc dword [esi + 0x3c]
mov dword [esi + 0x44], 2
mov al, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00489ca8
mov esp, ebp
pop ebp
ret 4
mov dword [esi + 0x44], 1
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
pop esi
call fcn.00489ca8
mov esp, ebp
pop ebp
ret 4