joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100021a0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push esi
push edi
sub eax, 0
je 0x100022fd
sub eax, 1
jne 0x10002302
call fcn.10002711
call fcn.10002630
test eax, eax
je 0x100022f5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
mov esi, sym.imp.KERNEL32.dll_DisableThreadLibraryCalls
mov edi, 0x5a4d
mov esi, dword [esi]
and esi, 0xffff0000
cmp word [esi], di
je 0x100021fb
nop dword [eax]
sub esi, 0x10000
cmp word [esi], di
jne 0x100021f0
push 0xc90b84d8
push 0x65105e51
push esi
call fcn.10001cb0
mov dword [0x10004048], eax
cmp eax, esi
jb 0x100022f5
push 0x20814dee
push 0xadc7119e
push esi
call fcn.10001cb0
mov dword [0x10004050], eax
cmp eax, esi
jb 0x100022f5
push 0xb4546995
push 0x8e969817
push esi
call fcn.10001cb0
mov dword [0x10004054], eax
cmp eax, esi
jb 0x100022f5
push 0xbd91d4ab
push 0xf99f27e7
push esi
call fcn.10001cb0
mov dword [0x1000404c], eax
cmp eax, esi
jb 0x100022f5
push 0xaeb4b7f4
push 0xb3b328e1
push esi
call fcn.10001cb0
mov dword [0x10004058], eax
cmp eax, esi
jb 0x100022f5
push 0x9757afaa
push 0x7a79d498
push esi
call fcn.10001cb0
mov dword [0x1000405c], eax
cmp eax, esi
jb 0x100022f5
push 0x44cc9e85
push 0xa3684fe
push esi
call fcn.10001cb0
mov dword [0x10004060], eax
cmp eax, esi
jb 0x100022f5
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov esi, dword [eax + 0xc]
and esi, 0xffff0000
cmp word [esi], di
je 0x100022dc
sub esi, 0x10000
cmp word [esi], di
jne 0x100022d1
push 0x1dedd1ff
push 0x89e89f6c
push esi
call fcn.10001cb0
mov dword [0x10004064], eax
cmp eax, esi
jae 0x10002302
pop edi
xor eax, eax
pop esi
pop ebp
ret 0xc
call fcn.10002670
pop edi
mov eax, 1
pop esi
pop ebp
ret 0xc

Function at 0x100025d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x1000262a
shl dword [ebp + 0x10], 8
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
nop word [eax + eax]
mov cl, byte [ecx]
movsx edx, cl
sub cl, 0x61
cmp cl, 0x19
mov ecx, dword [ebp + 0x10]
lea esi, [edx - 0x20]
cmova esi, edx
mov edx, dword [ebp + 0x14]
add ecx, esi
add eax, ebx
xor eax, dword [edx + ecx*4]
mov ecx, ebx
shl ecx, 5
add ecx, 3
add ecx, esi
add ebx, ecx
mov ecx, dword [ebp + 8]
inc ecx
add ebx, eax
mov dword [ebp + 8], ecx
sub edi, 1
jne 0x100025f0
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
Function at 0x4010b0
Capabilities:
Get local ipv4 addresses

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18
mov dword [ebp - 0x10], 0x1000
mov dword [esp], 0x1000
call dword [sym.imp.ucrtbase.dll_malloc]
mov edi, eax
test eax, eax
je 0x401150
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], edi
mov esi, dword [sym.imp.iphlpapi.dll_GetAdaptersAddresses]
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], 0
call esi
sub esp, 0x14
cmp eax, 0x6f
jne 0x40114c
lea esi, [esi]
mov eax, dword [ebp - 0x10]
mov dword [esp], edi
mov ebx, edi
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_realloc]
mov edi, eax
test eax, eax
je 0x40115a
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], 0
call esi
sub esp, 0x14
cmp eax, 0x6f
je 0x401108
test eax, eax
jne 0x40115c
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, ebx
mov dword [esp], edi
xor edi, edi
call dword [sym.imp.ucrtbase.dll_free]
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x401180
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x403c
call fcn.00401e20
sub esp, eax
lea esi, [ebp - 0x400c]
lea edi, [ebp - 0x4010]
mov eax, dword [esp + eax]
mov dword [ebp - 0x4014], edx
lea edx, [ebp - 0x4014]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0x2000
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_FormatMessageW]
mov ebx, eax
mov eax, dword [sym.imp.kernel32.dll_GetStdHandle]
sub esp, 0x1c
mov dword [esp], 0xfffffff5
mov dword [ebp - 0x4018], eax
call eax
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x401230
mov edx, dword [ebp - 0x4010]
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.kernel32.dll_GetOEMCP]
mov dword [ebp - 0x4024], eax
mov dword [ebp - 0x402c], ecx
call ecx
mov dword [esp + 0x1c], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [ebp - 0x4028], eax
call eax
sub esp, 0x20
mov dword [ebp - 0x401c], eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov edx, dword [ebp - 0x4024]
test eax, eax
mov dword [ebp - 0x4020], eax
je 0x401225
mov ecx, dword [ebp - 0x402c]
call ecx
mov edx, dword [ebp - 0x401c]
mov ecx, dword [ebp - 0x4020]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov ebx, dword [ebp - 0x4028]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call ebx
mov ebx, dword [ebp - 0x4018]
sub esp, 0x20
mov dword [esp], 0xfffffff5
call ebx
mov edx, dword [ebp - 0x401c]
sub esp, 4
mov dword [esp + 0xc], edi
mov edi, dword [ebp - 0x4020]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp + 0x10], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x40121f
Function at 0x401d80
Capabilities:
Get process heap flags
Terminate process

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sym._exit
nop
nop
nop
Function at 0x4017b0
Capabilities:
Accept command line arguments
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x469d38
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x47f1f4]
xor eax, esp
mov dword [esp + 0x60], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x88]
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor edi, edi
mov ecx, eax
mov dword [esp + 0x70], 0xf
mov dword [esp + 0x6c], edi
mov byte [esp + 0x5c], 0
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x401807
sub ecx, esi
push ecx
push eax
lea ecx, [esp + 0x60]
call fcn.004014a0
lea eax, [esp + 0x18]
mov dword [esp + 0x80], edi
push eax
mov dword [esp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edi
jg 0x401882
cmp dword [esp + 0x70], 0x10
jb 0x40185a
mov ecx, dword [esp + 0x5c]
push ecx
call fcn.00446286
add esp, 4
xor al, al
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.004461e8
add esp, 0x70
ret
xor edi, edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + edx*4]
xor eax, eax
mov word [esp + 0x24], ax
mov eax, ecx
mov dword [esp + 0x38], 7
mov dword [esp + 0x34], edi
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, di
jne 0x4018a5
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00401a20
lea eax, [esp + 0x20]
lea ecx, [esp + 0x3c]
mov byte [esp + 0x80], 1
call fcn.00405060
mov edi, dword [ebp + 0x14]
mov ebx, 0x10
cmp dword [ebp + 0x18], ebx
jb 0x4018e6
mov edx, dword [ebp + 4]
jmp 0x4018e9
lea edx, [ebp + 4]
mov esi, dword [eax + 0x14]
mov ecx, esi
cmp ecx, esi
jae 0x4018f2
mov ecx, esi
cmp esi, edi
jb 0x4018fa
mov ecx, edi
cmp dword [eax + 0x18], ebx
jb 0x401904
mov eax, dword [eax + 4]
jmp 0x401907
add eax, 4
push ecx
push edx
push eax
call fcn.00401f30
add esp, 0xc
test eax, eax
jne 0x401928
cmp esi, edi
jae 0x40191f
or eax, 0xffffffff
jmp 0x401926
xor eax, eax
cmp esi, edi
setne al
test eax, eax
mov esi, 0x10
sete bl
cmp dword [esp + 0x54], esi
jb 0x401943
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00446286
add esp, 4
mov byte [esp + 0x80], 0
cmp dword [esp + 0x38], 8
mov dword [esp + 0x54], 0xf
mov dword [esp + 0x50], 0
mov byte [esp + 0x40], 0
jb 0x401974
mov edx, dword [esp + 0x24]
push edx
call fcn.00446286
add esp, 4
test bl, bl
jne 0x401990
mov eax, dword [esp + 0x14]
inc eax
cmp eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
jl 0x401880
jmp 0x401846
cmp dword [esp + 0x70], esi
jb 0x4019a3
mov eax, dword [esp + 0x5c]
push eax
call fcn.00446286
add esp, 4
mov al, 1
jmp 0x40185c
Function at 0x406960
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x46a0cb
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0x1c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2c]
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
mov dword [ecx + ebp], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov edx, dword [ebp]
mov edi, dword [edx + 4]
add edi, ebp
mov ecx, edi
call fcn.00407370
lea esi, [ebp + 4]
push 0x20
mov ecx, edi
mov dword [edi + 0x28], esi
mov dword [edi + 0x2c], ebx
call fcn.00406d40
mov byte [edi + 0x30], al
cmp dword [edi + 0x28], ebx
jne 0x4069d9
mov eax, dword [edi + 8]
or eax, 4
or eax, 4
push ebx
push eax
mov ecx, edi
call fcn.00402350
mov dword [edi + 4], ebx
mov dword [esp + 0x24], 2
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
mov dword [ecx + ebp], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov ecx, esi
call fcn.00406c40
lea edx, [esi + 8]
mov dword [esi + 0x10], edx
mov dword [esi], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [esi + 0x48], bl
mov byte [esi + 0x41], bl
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], ebx
mov eax, dword [esi + 0x24]
mov dword [eax], ebx
mov ecx, dword [esi + 0x34]
mov dword [ecx], ebx
mov edx, dword [esi + 0x10]
mov dword [edx], ebx
mov eax, dword [esi + 0x20]
mov dword [eax], ebx
mov ecx, dword [esi + 0x30]
mov dword [ecx], ebx
mov dword [esi + 0x4c], ebx
mov edx, dword [0x481d3c]
mov dword [esi + 0x44], edx
mov dword [esi + 0x3c], ebx
mov eax, ebp
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
Function at 0x406c40
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push 0xffffffffffffffff
push 0x468f1b
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x14], esi
lea ecx, [esi + 4]
mov dword [esi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.004458b1
push 4
mov dword [esp + 0x24], 0
call fcn.0044635f
mov edi, eax
add esp, 4
test edi, edi
je 0x406cc2
call fcn.00445c5a
mov dword [edi], eax
call fcn.00445b2f
push 0
lea ecx, [esp + 0x14]
mov ebx, eax
call fcn.00445a53
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x406cb7
inc eax
mov dword [ebx + 4], eax
lea ecx, [esp + 0x10]
call fcn.00445a7b
jmp 0x406cc4
xor edi, edi
lea eax, [esi + 8]
mov dword [esi + 0x10], eax
lea ecx, [esi + 0x18]
mov dword [esi + 0x20], ecx
lea edx, [esi + 0x1c]
mov dword [esi + 0x24], edx
mov dword [esi + 0x38], edi
lea eax, [esi + 0xc]
mov dword [esi + 0x14], eax
lea ecx, [esi + 0x28]
mov dword [esi + 0x30], ecx
lea edx, [esi + 0x2c]
mov dword [esi + 0x34], edx
mov dword [eax], 0
mov eax, dword [esi + 0x24]
mov dword [eax], 0
mov ecx, dword [esi + 0x34]
mov dword [ecx], 0
mov edx, dword [esi + 0x10]
mov dword [edx], 0
mov eax, dword [esi + 0x20]
mov dword [eax], 0
mov ecx, dword [esi + 0x30]
mov dword [ecx], 0
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x14
ret

Function at 0x406ec0
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4692f8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
xor ebx, ebx
push 0xffffffffffffffff
push ebx
xor eax, eax
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x34], 7
mov dword [esp + 0x30], ebx
mov word [esp + 0x20], ax
call fcn.00401b10
mov eax, str..exe
mov dword [esp + 0x34], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406f17
sub eax, edx
sar eax, 1
push eax
lea esi, [esp + 0x14]
call fcn.00407120
push 0xffffffffffffffff
push ebx
xor edx, edx
mov dword [edi + 0x18], 7
mov dword [edi + 0x14], ebx
push eax
mov ecx, edi
mov word [edi + 4], dx
call fcn.00401b10
cmp dword [esp + 0x28], 8
jb 0x406f5f
mov eax, dword [esp + 0x14]
push eax
call fcn.00446286
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x2c
ret
Function at 0x407240
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x468fa3
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov dword [esi], vtable.std::locale::_Locimp.0
push esi
mov dword [esp + 0x18], 1
call fcn.00445b5f
add esp, 4
cmp dword [esi + 0x30], 0x10
jb 0x407291
mov eax, dword [esi + 0x1c]
push eax
call fcn.00446286
add esp, 4
xor eax, eax
mov dword [esi + 0x30], 0xf
mov dword [esi + 0x2c], eax
mov byte [esi + 0x1c], al
mov dword [esi], vtable.std::locale::facet.0
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret

Function at 0x407620
Capabilities:
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push 0xffffffffffffffff
push 0x469511
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x47f1f4]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push ebp
mov eax, dword [0x47f1f4]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [esp + 0x18], ebx
xor eax, eax
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
mov dword [esp + 0x1c], esi
mov word [esi + 4], ax
push 0xf0000000
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
mov dword [esp + 0x64], ebx
mov ebp, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push ebx
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x2c], 1
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
call ebp
test eax, eax
jne 0x4076b4
push ebx
push 1
push str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
push ebx
lea edx, [esp + 0x20]
push edx
call ebp
test eax, eax
je 0x407772
cmp edi, ebx
je 0x407766
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0xc]
push eax
push ebx
push ebx
push 0x8003
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0xc]
push ebx
push edx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push ebx
xor eax, eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x49], eax
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov word [esp + 0x55], ax
mov byte [esp + 0x57], al
mov eax, dword [esp + 0x18]
push 2
push eax
mov dword [esp + 0x28], 0x10
mov byte [esp + 0x50], bl
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
lea edx, [esp + 0x20]
push edx
lea ebx, [esp + 0x40]
call fcn.00407540
add esp, 4
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
mov dword [esp + 0x64], 1
call fcn.00401b10
cmp dword [esp + 0x38], 8
jb 0x407764
mov eax, dword [esp + 0x24]
push eax
call fcn.00446286
add esp, 4
xor ebx, ebx
mov ecx, dword [esp + 0x10]
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop ebp
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.004461e8
add esp, 0x50
ret
Function at 0x412d20
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x47f1f4]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x412d75
mov eax, dword [esp]
cmp al, 2
jne 0x412d6f
shr eax, 8
cmp al, 2
jne 0x412d6f
call fcn.00414480
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004461e8
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.004461e8
add esp, 0x194
ret
Function at 0x41f060
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x41f092
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x41f1d0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x1a8]
test ecx, ecx
je 0x41f1eb
mov edx, dword [esi + 0x134]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x41f21f
cmp eax, 2
jg 0x41f21f
mov ecx, dword [esi + 0x130]
push ecx
push 1
lea edx, [eax + eax*2 + 0x46da98]
push 2
push edx
call fcn.00446a3e
mov eax, dword [esi + 0x130]
push eax
push 1
push edi
push ebx
call fcn.00446a3e
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x154]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
mov dword [ebx], 0
cmp edi, 0xffffffff
jne 0x41f5ad
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x41f584
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.00412570
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.0041f3b0
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x8624], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x421310
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
cmp dword [esi + 0x480], eax
push 4
lea ecx, [esp + 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x42134e
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.0041f320
add esp, 0xc
add esp, 0x14
ret
mov edx, dword [esi + 0x484]
push edx
mov dword [esp + 0xc], 1
call fcn.00422700
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x488]
push eax
call fcn.00422700
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4213c7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.0041f320
add esp, 0x10
add esp, 0x14
ret
Function at 0x4219c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x47f1f4]
xor eax, esp
mov dword [esp + 0x108], eax
push ebp
mov ebp, dword [esp + 0x114]
cmp dword [ebp + 0x8c], 2
push edi
mov edi, dword [ebp]
mov dword [esp + 0xc], edi
je 0x421b35
cmp dword [ebp + 0x270], 0
push ebx
push esi
jne 0x421b2a
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x9c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x421a4c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00412570
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.0041f3b0
add esp, 0x18
jmp 0x421b33
push ebx
lea edx, [esp + 0x1c]
push 0
push edx
mov dword [esp + 0x1c], ebx
call fcn.00449de0
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x421a99
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.00412570
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.0041f3b0
add esp, 0x18
jmp 0x421b33
lea edi, [ebp + 0xb8]
lea ebx, [ebp + 0xe8]
lea esi, [esp + 0x98]
call fcn.00421980
test eax, eax
jne 0x421ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00412570
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.0041f3b0
add esp, 0x18
jmp 0x421b33
lea edi, [ebp + 0x58]
mov ecx, 0xb
lea esi, [ebp + 0xb8]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [ebp + 0x11c]
lea edi, [ebp + 0xec]
lea esi, [esp + 0x18]
call fcn.00421980
test eax, eax
jne 0x421b2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.00412570
push eax
mov eax, dword [esp + 0x20]
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push eax
call fcn.0041f3b0
add esp, 0x18
jmp 0x421b33
push ebp
call fcn.00421920
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x110]
pop edi
pop ebp
xor ecx, esp
call fcn.004461e8
add esp, 0x10c
ret

Function at 0x421b50
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x364]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x421b93
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00412570
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0041f320
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0041f320
add esp, 8
pop esi
pop ecx
ret