joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4680a0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
lea eax, [ecx + eax*2 + 0xc]
push edi
push eax
call dword [0x54a0e0]
mov edi, eax
add esp, 4
test edi, edi
jne 0x4680c5
pop edi
pop esi
pop ecx
ret
lea eax, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], eax
mov edx, dword [esi + 0xc]
push ebx
add edx, eax
push ebp
mov ebp, dword [esp + 0x20]
mov dword [edi + 8], edx
cmp ebp, dword [esi + 0x10]
jbe 0x46810c
push eax
mov eax, dword [esi]
call eax
mov ecx, dword [esp + 0x20]
mov edx, dword [edi + 4]
mov eax, dword [esi + 4]
push ebp
push ecx
push edx
call eax
mov ebx, dword [edi + 8]
mov ecx, dword [edi + 4]
add ebx, dword [esi + 0xc]
mov edx, dword [esi + 8]
push ecx
push ebx
call edx
mov ebp, dword [esi + 0x14]
add esp, 0x18
jmp 0x468110
mov ebx, dword [esp + 0x1c]
mov eax, dword [edi + 4]
mov ecx, dword [esi]
push eax
call ecx
mov edx, dword [edi + 8]
mov eax, dword [esi]
push edx
call eax
add esp, 8
test ebp, ebp
mov dword [esp + 0x10], 0
jbe 0x468170
mov dword [esp + 0x10], ebp
mov cl, byte [ebx]
xor cl, 0x36
mov byte [esp + 0x18], cl
mov eax, dword [edi + 4]
mov ecx, dword [esi + 4]
push 1
lea edx, [esp + 0x1c]
push edx
push eax
call ecx
mov dl, byte [ebx]
xor dl, 0x5c
mov byte [esp + 0x24], dl
mov ecx, dword [edi + 8]
mov edx, dword [esi + 4]
push 1
lea eax, [esp + 0x28]
push eax
push ecx
add ebx, 1
call edx
add esp, 0x18
sub ebp, 1
jne 0x468133
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0x10]
pop ebp
pop ebx
jae 0x4681b3
jmp 0x468180
mov ecx, dword [edi + 4]
mov edx, dword [esi + 4]
push 1
push 0x50bf5c
push ecx
call edx
mov eax, dword [edi + 8]
mov ecx, dword [esi + 4]
push 1
push 0x50bf5d
push eax
call ecx
mov eax, dword [esp + 0x20]
add eax, 1
add esp, 0x18
cmp eax, dword [esi + 0x10]
mov dword [esp + 8], eax
jb 0x468180
mov eax, edi
pop edi
pop esi
pop ecx
ret
Function at 0x46a900
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4fbea8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov edi, ecx
push str.rootLogger
lea ecx, [esp + 0x1c]
call fcn.0047b960
mov ebx, dword [edi + 0x20]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
lea esi, [edi + 0x18]
push ecx
lea ecx, [esi + 4]
mov dword [esp + 0x80], 0
call fcn.0046ee60
cmp dword [eax], ebx
lea ecx, [esp + 0x18]
setne bl
or ebp, 0xffffffff
mov dword [esp + 0x78], ebp
call fcn.0047b260
test bl, bl
je 0x46aa07
mov ecx, dword [edi + 8]
mov edx, dword [ecx]
mov edx, dword [edx + 0x34]
lea eax, [esp + 0x18]
push eax
call edx
push str.rootLogger
lea ecx, [esp + 0x3c]
mov dword [esp + 0x7c], 1
call fcn.0047b960
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x48]
push ecx
mov bl, 2
mov ecx, esi
mov byte [esp + 0x80], bl
call fcn.0046f290
push eax
sub esp, 8
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov byte [esp + 0x88], 3
call fcn.00468fa0
mov ecx, edi
call fcn.0046a400
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], bl
call fcn.0047b260
lea ecx, [esp + 0x38]
mov byte [esp + 0x78], 1
call fcn.0047b260
lea ecx, [esp + 0x18]
mov dword [esp + 0x78], ebp
call fcn.00468ca0
push str.logger.
lea ecx, [esp + 0x3c]
call fcn.0047b960
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x60]
push ecx
mov ecx, esi
mov dword [esp + 0x80], 4
call fcn.0046f8f0
lea ecx, [esp + 0x38]
mov byte [esp + 0x78], 6
call fcn.0047b260
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x60]
call fcn.0046f390
mov eax, dword [esp + 0x30]
mov esi, dword [eax + 4]
cmp esi, eax
mov byte [esp + 0x78], 7
je 0x46ab10
mov ebx, dword [sym.imp.MSVCR80.dll__wassert]
cmp byte [esi + 0xc], 0
je 0x46aa81
push 0xdf
push str.E:ANKEStationdcmtk360ofstdincludedcmtk_ofstd_oflist.h
push 0x50c0f8
call ebx
add esp, 0xc
mov eax, dword [edi]
mov edx, dword [eax + 8]
lea ebp, [esi + 0x10]
push ebp
lea ecx, [esp + 0x28]
push ecx
mov ecx, edi
call edx
cmp byte [esi + 0xc], 0
mov byte [esp + 0x78], 8
je 0x46aab2
push 0xdf
push str.E:ANKEStationdcmtk360ofstdincludedcmtk_ofstd_oflist.h
push 0x50c0f8
call ebx
add esp, 0xc
push ebp
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x64]
call fcn.0046f290
push eax
sub esp, 8
lea edx, [esp + 0x30]
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
mov byte [esp + 0x88], 9
call fcn.00468fa0
mov ecx, edi
call fcn.0046a400
lea ecx, [esp + 0x50]
mov byte [esp + 0x78], 8
call fcn.0047b260
lea ecx, [esp + 0x24]
mov byte [esp + 0x78], 7
call fcn.00468ca0
mov esi, dword [esi + 4]
cmp esi, dword [esp + 0x30]
jne 0x46aa67
or ebp, 0xffffffff
lea ecx, [esp + 0x2c]
mov byte [esp + 0x78], 6
call fcn.0047c800
lea ecx, [esp + 0x5c]
mov dword [esp + 0x78], ebp
call fcn.0046f280
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x46ac20
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fbf10
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00469b40
push str.log4cplus.
lea ecx, [esp + 0xc]
call fcn.0047b960
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x18]
add esi, 0x18
push ecx
mov ecx, esi
mov dword [esp + 0x34], 0
call fcn.0046f8f0
add eax, 4
push eax
lea ecx, [esi + 4]
mov byte [esp + 0x30], 1
call fcn.0046a7c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 0
call fcn.0046f280
lea ecx, [esp + 8]
mov dword [esp + 0x2c], 0xffffffff
call fcn.0047b260
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x28
ret

Function at 0x46bfe0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fc393
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 8], esi
mov eax, dword [esi + 0x1c]
mov dword [esi], vtable.log4cplus::spi::LoggerImpl.2.0
mov dword [esi + 4], vtable.log4cplus::spi::LoggerImpl.1.0
mov ecx, dword [eax + 4]
mov dword [ecx + esi + 0x1c], vtable.log4cplus::spi::LoggerImpl.0
mov eax, dword [esi + 0x30]
test eax, eax
mov dword [esp + 0x14], 1
je 0x46c041
mov edx, dword [eax + 0x1c]
mov ecx, dword [edx + 4]
lea ecx, [ecx + eax + 0x1c]
call fcn.0046bc70
lea ecx, [esi + 0x20]
mov byte [esp + 0x14], 0
call fcn.0047b260
mov ecx, esi
mov dword [esp + 0x14], 0xffffffff
call fcn.0046b330
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
Function at 0x46fb10
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fcc51
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call fcn.0047b880
mov eax, dword [esp + 0x2c]
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x30], 1
call fcn.0047cb80
mov esi, dword [esp + 0x38]
add esp, 8
push eax
mov ecx, esi
call fcn.0047be80
lea ecx, [esp + 0xc]
mov dword [esp + 8], 1
mov byte [esp + 0x20], 0
call fcn.0047b260
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x1c
ret

Function at 0x471d60
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fcc51
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call fcn.0047b880
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x28], 1
call fcn.0046e810
mov esi, dword [esp + 0x30]
add esp, 8
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0047be80
lea ecx, [esp + 0xc]
mov dword [esp + 8], 1
mov byte [esp + 0x20], 0
call fcn.0047b260
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x1c
ret

Function at 0x472780
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fd3b7
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x54a020]
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.log4cplus::spi::InternalLoggingEvent.0
lea ecx, [esi + 0x60]
mov dword [esp + 0x14], 4
call fcn.0047b260
lea ecx, [esi + 0x50]
mov byte [esp + 0x14], 3
call fcn.0047b260
lea ecx, [esi + 0x30]
mov byte [esp + 0x14], 2
call fcn.0047b260
lea ecx, [esi + 0x24]
mov byte [esp + 0x14], 1
call fcn.0047b260
lea ecx, [esi + 0x14]
mov byte [esp + 0x14], 0
call fcn.0047b260
lea ecx, [esi + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.0047b260
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x10
ret
Function at 0x472b90
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fd498
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x54a020]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], ecx
mov eax, dword [ecx + 8]
xor esi, esi
push eax
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, esi
je 0x472c2d
mov eax, dword [eax + 4]
cmp eax, esi
je 0x472c2d
push 0xffffffffffffffff
push esi
mov esi, dword [ebp + 8]
add eax, 0x14
push eax
mov ecx, esi
call fcn.0047be80
jmp 0x472c43
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp + 8]
push 0x533e66
mov ecx, esi
call fcn.0047b960
mov eax, esi
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

Function at 0x472d20
Capabilities:
Allocate thread local storage

Disassembly:
push 0xffffffffffffffff
push 0x4fd4fe
mov eax, dword fs:[0]
push eax
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 4]
mov dword fs:[0], eax
mov eax, 1
test byte [0x55dba4], al
jne 0x472d87
or dword [0x55dba4], eax
mov ecx, 0x55db98
mov dword [esp + 0xc], 0
call fcn.0046df40
mov dword [0x55db98], 0x50d01c
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push 0x501ec0
mov dword [0x55dba0], eax
call fcn.0042b886
add esp, 4
mov eax, 0x55db98
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
pop ecx
add esp, 0xc
ret
Function at 0x4744a0
Capabilities:
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x4fda20
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0046dfb0
lea ebp, [esi + 0x34]
mov ecx, ebp
mov edi, eax
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::close_void_]
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
push 0
push 0
lea ecx, [ecx + esi + 0x34]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool_]
mov ecx, dword [esi + 0xdc]
test ecx, ecx
lea ebx, [esi + 0xbc]
jle 0x474600
call fcn.00473e40
push 0x50d3a8
lea edx, [esp + 0x24]
push ebx
push edx
call fcn.0047c600
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x64], 0
call fcn.0047be80
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 2
call fcn.0047b260
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x47454c
mov eax, 0x533e66
push eax
call dword [sym.imp.MSVCR80.dll_remove]
push ebx
lea eax, [esp + 0x4c]
push str.Renaming_file
push eax
call fcn.0047c570
push str._to
push eax
lea ecx, [esp + 0x50]
push ecx
mov byte [esp + 0x74], 3
call fcn.0047c600
lea edx, [esp + 0x30]
push edx
push eax
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x80], 4
call fcn.0047c4d0
add esp, 0x28
push eax
mov ecx, edi
mov byte [esp + 0x5c], 5
call fcn.0046dcf0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x58], 4
call fcn.0047b260
lea ecx, [esp + 0x38]
mov byte [esp + 0x58], 3
call fcn.0047b260
lea ecx, [esp + 0x44]
mov byte [esp + 0x58], 2
call fcn.0047b260
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4745d7
mov eax, 0x533e66
mov ecx, dword [ebx]
test ecx, ecx
jne 0x4745e2
mov ecx, 0x533e66
push eax
push ecx
call dword [sym.imp.MSVCR80.dll_rename]
neg eax
sbb eax, eax
push eax
push ebx
lea esi, [esp + 0x24]
call fcn.00473350
add esp, 0x10
mov ecx, esi
jmp 0x474627
push str._has_no_backups_specified
lea ecx, [esp + 0x48]
push ebx
push ecx
call fcn.0047c600
add esp, 0xc
push eax
mov ecx, edi
mov dword [esp + 0x5c], 6
call fcn.0046dcf0
lea ecx, [esp + 0x44]
mov dword [esp + 0x58], 0xffffffff
call fcn.0047b260
mov eax, dword [ebx]
test eax, eax
jne 0x47463f
mov eax, 0x533e66
push 0x40
push 0x12
push eax
mov ecx, ebp
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ofstream_char__struct_std::char_traits_char__::open_char_const___int__int_]
push ebx
push ebp
push edi
call fcn.00473490
add esp, 0xc
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
Function at 0x4762a0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4fdfa8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
xor esi, esi
lea esp, [esp]
push 0
lea ecx, [esp + 0x40]
push ecx
mov eax, edi
sub eax, esi
push eax
lea edx, [esi + ebx]
push edx
push ebp
mov dword [esp + 0x50], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47630d
add esi, dword [esp + 0x3c]
cmp esi, edi
jne 0x4762e0
jmp 0x476349
push str.Win32ConsoleAppender::write_handle__WriteFile_has_failed.
lea ecx, [esp + 0x1c]
call fcn.0047b960
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x30], 0
call fcn.0046dfb0
mov ecx, eax
call fcn.0046de70
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], 0xffffffff
call fcn.0047b260
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0xc
Function at 0x477350
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fe233
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0xb0]
mov dword fs:[0], eax
mov esi, ecx
push 1
push 2
lea ecx, [esp + 0x38]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_int_]
cmp byte [esi + 8], 0
mov dword [esp + 0xb8], 0
mov eax, str.true
jne 0x4773a5
mov eax, str.false
mov ecx, dword [esi]
push eax
mov eax, dword [esi + 4]
push str.__leftAlign
push eax
push str.__max
push ecx
lea edx, [esp + 0x44]
push str.min
push edx
call fcn.00413340
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00413340
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.00413340
add esp, 8
push eax
call fcn.00413340
add esp, 8
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::str_void_]
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0xb8], 1
jb 0x477416
mov eax, dword [eax + 4]
jmp 0x477419
add eax, 4
push eax
lea ecx, [esp + 0xc]
call fcn.0047b960
lea ecx, [esp + 0x14]
mov byte [esp + 0xb8], 3
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 0xc4]
call fcn.0046dcf0
lea ecx, [esp + 8]
mov byte [esp + 0xb8], 0
call fcn.0047b260
lea ecx, [esp + 0x30]
mov dword [esp + 0xb8], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__::vbase_dtor_void_]
mov ecx, dword [esp + 0xb0]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0xb4
ret 4

Function at 0x477880
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4fcc51
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
lea ecx, [esp + 0xc]
mov dword [esp + 8], 0
call fcn.0047b880
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x28], 1
call fcn.004772b0
mov esi, dword [esp + 0x30]
add esp, 8
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0047be80
lea ecx, [esp + 0xc]
mov dword [esp + 8], 1
mov byte [esp + 0x20], 0
call fcn.0047b260
mov eax, esi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x1c
ret
Function at 0x47acf0
Capabilities:
Initialize winsock library

Disassembly:
push 0xffffffffffffffff
push 0x4febed
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
push esi
mov eax, dword [0x54a020]
xor eax, esp
push eax
lea eax, [esp + 0xd4]
mov dword fs:[0], eax
mov eax, dword [0x55dd38]
cmp eax, 2
je 0x47aecf
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
push 0
push 1
push 0x55dd38
call esi
sub eax, 0
je 0x47ae37
sub eax, 1
je 0x47ada2
sub eax, 1
je 0x47aecf
push 0x7d
push str.......ofloglibsrcwinsock.cc
push 0x50df00
call dword [sym.imp.MSVCR80.dll__wassert]
add esp, 0xc
push str.Unknown_WinSock_state.
lea ecx, [esp + 0x6c]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x88]
mov dword [esp + 0xe0], 3
call fcn.0047ac40
push 0x5441f4
lea edx, [esp + 0x88]
push edx
call sub.MSVCR80.dll__CxxThrowException
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x47adb0
mov eax, dword [0x55dd38]
sub eax, 1
jne 0x47adbf
push eax
call esi
jmp 0x47adb0
sub eax, 1
je 0x47aecf
push 0x73
push str.......ofloglibsrcwinsock.cc
push 0x50df00
call dword [sym.imp.MSVCR80.dll__wassert]
add esp, 0xc
push str.Unknown_WinSock_state.
lea ecx, [esp + 0x50]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea ecx, [esp + 8]
mov dword [esp + 0xdc], 1
call dword [sym.imp.MSVCR80.dll_public:_void___thiscall_std::exception::constructor_void_]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xe0], 2
mov dword [esp + 0xc], vtable.std::runtime_error.0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
push 0x5441f4
lea ecx, [esp + 0xc]
push ecx
mov byte [esp + 0xe4], 1
call sub.MSVCR80.dll__CxxThrowException
push 0x55dba8
push 0x202
call sub.WSOCK32.dll_WSAStartup
test eax, eax
push 1
je 0x47aeac
push 0
push 0x55dd38
call esi
cmp eax, 1
je 0x47ae6f
push 0x59
push str.......ofloglibsrcwinsock.cc
push str.val__WS_INITIALIZING
call dword [sym.imp.MSVCR80.dll__wassert]
add esp, 0xc
push str.Could_not_initialize_WinSock.
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const__]
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0xb0]
mov dword [esp + 0xe0], 0
call fcn.0047ac40
push 0x5441f4
lea eax, [esp + 0xb0]
push eax
call sub.MSVCR80.dll__CxxThrowException
push 2
push 0x55dd38
call esi
cmp eax, 1
je 0x47aecf
push 0x61
push str.......ofloglibsrcwinsock.cc
push str.val__WS_INITIALIZING
call dword [sym.imp.MSVCR80.dll__wassert]
add esp, 0xc
mov ecx, dword [esp + 0xd4]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0xd8
ret
Function at 0x47af60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x1c
mov eax, dword [0x54a020]
xor eax, esp
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
push esi
push edi
mov edi, dword [esp + 0x28]
mov dword [esp + 8], eax
call fcn.0047acf0
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
jne 0x47afa6
pop edi
or eax, eax
pop esi
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0042b7d2
add esp, 0x1c
ret
mov eax, dword [edi]
push ebx
or ebx, 0xffffffff
test eax, eax
jne 0x47afb5
mov eax, 0x533e66
push ebp
push eax
call sub.WSOCK32.dll_gethostbyname
mov ebp, eax
test ebp, ebp
je 0x47afc9
cmp word [ebp + 8], 2
je 0x47b000
mov edi, dword [edi]
test edi, edi
jne 0x47afd4
mov edi, 0x533e66
push edi
call sub.WS2_32.dll_inet_addr
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x47b000
mov ecx, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
mov dword [ecx], 2
or eax, eax
pop esi
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0042b7d2
add esp, 0x1c
ret
mov edx, dword [esp + 0x34]
push edx
call sub.WSOCK32.dll_htons
test ebp, ebp
mov word [esp + 0x1a], ax
mov word [esp + 0x18], 2
je 0x47b027
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov dword [esp + 0x1c], edx
jmp 0x47b030
mov dword [esp + 0x1c], ebx
jmp 0x47b030
push 0x10
lea eax, [esp + 0x1c]
push eax
push esi
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x47b06a
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2714
je 0x47b030
push esi
call sub.WSOCK32.dll_closesocket
pop ebp
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.0042b7d2
add esp, 0x1c
ret
push 4
lea ecx, [esp + 0x18]
push ecx
push 1
push 6
push esi
mov dword [esp + 0x28], 1
call sub.WSOCK32.dll_setsockopt
test eax, eax
jne 0x47b04e
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
pop ebp
pop ebx
mov dword [edx], eax
pop edi
mov eax, esi
pop esi
xor ecx, esp
call fcn.0042b7d2
add esp, 0x1c
ret