joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408886
Capabilities:
Check mutex on windows
Set current directory

Disassembly:
mov eax, 0x40eb23
call fcn.0040dca0
mov eax, 0x1754
call fcn.0040dc40
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x10f]
mov byte [ebp - 0x110], bl
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x110]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x110]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
cmp eax, ebx
pop ecx
je 0x4088ec
mov byte [eax], bl
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 1
push str.resdl.log
mov ecx, 0x415b20
call fcn.00409ae6
lea ecx, [ebp - 0x1760]
call fcn.00401eeb
mov eax, dword [ebp - 0x120]
mov dword [ebp - 4], ebx
cmp eax, ebx
jne 0x40891a
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40894f
push dword [ebp + 8]
lea ecx, [ebp - 0x1760]
call fcn.0040870b
test al, al
jne 0x408948
push 1
pop ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1760]
call fcn.0040231d
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, ebx
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x10

Function at 0x408971
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 8]
add ecx, 0x108
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
test eax, eax
je 0x4089a4
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
mov edx, dword [ebp - 4]
mov dword [ecx + 4], edx
jmp 0x4089ae
mov ecx, dword [ebp + 8]
and dword [ecx], 0
and dword [ecx + 4], 0
leave
ret 4
Function at 0x40946e
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [esp + 0x14]
mov esi, ecx
mov dword [0x4158e8], 0x2539
mov dword [0x4158ec], 0x210
mov eax, dword [esi + 0x3ac]
and dword [0x4158f8], 0
push 0x4129b8
mov edi, 0x415900
push 0x1ff
push edi
mov dword [0x4158f0], eax
mov dword [0x4158f4], 3
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
push edi
mov edi, 0x415b20
push str.StateMsg:__s
push edi
call fcn.00409d3d
add esp, 0xc
add esi, 0x3b0
push 2
pop ebp
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40952e
mov ecx, dword [0x4158ec]
push 0
add ecx, 8
push ecx
push 0x4158e8
push eax
call dword [sym.imp.WS2_32.dll_send]
push dword [esi]
mov ebx, eax
push str.StateMsg:_sock_d
push edi
call fcn.00409d3d
add esp, 0xc
cmp ebx, 0xffffffff
je 0x409519
cmp ebx, 4
jae 0x40952e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SendStateMsg:_send_error_d
push edi
call fcn.00409d3d
add esp, 0xc
add esi, 0x10c
dec ebp
jne 0x4094de
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x409673
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
and byte [ebp - 0x104], 0
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
and byte [ebp - 0x208], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x207]
push dword [ebp + 8]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push eax
push str._s_patch__d.pkg
lea eax, [ebp - 0x208]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [ebp - 0x208]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 0x1c
neg eax
sbb eax, eax
pop edi
inc eax
leave
ret 4
Function at 0x40a9eb
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push esi
push edi
push 0x105
lea eax, [ebp - 0x108]
push dword [ebp + 8]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
and byte [ebp - 4], 0
lea eax, [ebp - 0x108]
push eax
call fcn.0040a947
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
lea eax, [ebp - 0x108]
push 0x2f
push eax
call esi
add esp, 0x18
test eax, eax
je 0x40aa42
mov byte [eax], 0x5c
inc eax
push 0x2f
push eax
call esi
pop ecx
pop ecx
jmp 0x40aa31
cmp byte [ebp + edi - 0x109], 0x5c
je 0x40aa5c
mov byte [ebp + edi - 0x108], 0x5c
and byte [ebp + edi - 0x107], 0
lea eax, [ebp - 0x108]
push 0x5c
push eax
call esi
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x40aa9f
and byte [edi], 0
lea eax, [ebp - 0x108]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
pop ecx
cmp eax, 0xffffffff
pop ecx
jne 0x40aa96
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCRT.dll__mkdir]
pop ecx
mov byte [edi], 0x5c
inc edi
push 0x5c
push edi
jmp 0x40aa65
pop edi
mov al, 1
pop esi
leave
ret

Function at 0x40ab28
Capabilities:
Copy file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0x104
lea eax, [ebp - 0x104]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov esi, dword [sym.imp.MSVCRT.dll_strrchr]
and byte [ebp - 1], 0
lea eax, [ebp - 0x104]
push 0x5c
push eax
call esi
mov edi, eax
lea eax, [ebp - 0x104]
push 0x2f
push eax
call esi
add esp, 0x1c
cmp edi, eax
jbe 0x40ab75
mov eax, edi
test eax, eax
je 0x40ab89
and byte [eax], 0
lea eax, [ebp - 0x104]
push eax
call fcn.0040a9eb
pop ecx
push ebx
call fcn.0040a9be
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop ecx
test al, al
je 0x40ab9f
push 0x20
push ebx
call esi
push 0
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40abb3
xor al, al
jmp 0x40abc5
push ebx
call fcn.0040a9be
test al, al
pop ecx
je 0x40abc3
push 0x20
push ebx
call esi
mov al, 1
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40abfd
Capabilities:
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call fcn.0040a9be
test al, al
pop ecx
je 0x40ac16
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop esi
ret
Function at 0x40ac5c
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
push esi
mov esi, 0x104
push dword [ebp + 0xc]
lea eax, [ebp - 0x450]
push str._s
push esi
push eax
call fcn.00401581
add esp, 0x10
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40aca6
xor al, al
jmp 0x40ad42
lea ecx, [ebp - 0x144]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push ecx
push eax
call ebx
test eax, eax
je 0x40ad36
push edi
mov edi, str._s_s
cmp byte [ebp - 0x118], 0x2e
je 0x40ad25
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x248]
push dword [ebp + 8]
push edi
push esi
push eax
call fcn.00401581
add esp, 0x14
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x34c]
push dword [ebp + 0xc]
push edi
push esi
push eax
call fcn.00401581
add esp, 0x14
lea eax, [ebp - 0x34c]
test byte [ebp - 0x144], 0x10
push eax
lea eax, [ebp - 0x248]
push eax
je 0x40ad1e
call fcn.0040ac5c
jmp 0x40ad23
call fcn.0040ab28
pop ecx
pop ecx
lea eax, [ebp - 0x144]
push eax
push dword [ebp - 4]
call ebx
test eax, eax
jne 0x40acc1
pop edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
pop ebx
pop esi
leave
ret

Function at 0x40adc5
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x244
push ebx
push esi
push dword [ebp + 8]
mov esi, 0x104
lea eax, [ebp - 0x244]
push str._s
push esi
push eax
call fcn.00401581
add esp, 0x10
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40aea6
lea eax, [ebp - 0x140]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push eax
push ebx
call edi
test eax, eax
je 0x40ae95
lea eax, [ebp - 0x114]
push 0x412fe4
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40ae8b
lea eax, [ebp - 0x114]
push 0x412fe0
push eax
call sub.MSVCRT.dll_strcmp
pop ecx
test eax, eax
pop ecx
je 0x40ae8b
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x244]
push dword [ebp + 8]
push str._s_s
push esi
push eax
call fcn.00401581
add esp, 0x14
lea eax, [ebp - 0x244]
test byte [ebp - 0x140], 0x10
push eax
je 0x40ae85
call fcn.0040adc5
jmp 0x40ae8a
call fcn.0040abfd
pop ecx
lea eax, [ebp - 0x140]
push eax
push ebx
jmp 0x40ae1b
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40af2d
Capabilities:
Move file

Disassembly:
push esi
push edi
xor edi, edi
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov esi, eax
test esi, esi
jne 0x40af53
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 3
jl 0x40af31
mov eax, esi
pop edi
pop esi
ret
Function at 0x40af60
Capabilities:
Get common file path

Disassembly:
mov eax, 0x40ed91
call fcn.0040dca0
sub esp, 0x108
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x10], esi
lea ecx, [esi + 0xc]
mov dword [esi + 8], ebx
call fcn.0040be5f
mov eax, dword [ebp + 8]
lea ecx, [esi + 0x1b90]
mov dword [esi + 0xb7c], eax
mov al, byte [ebp + 0xb]
push ebx
mov byte [ecx], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov dword [ebp - 4], ebx
push 0x6664
mov dword [esi], 0x40f400
mov dword [esi + 0x1ba0], ebx
mov dword [esi + 0xb80], ebx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp + 8], eax
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x40afd3
mov ecx, eax
call fcn.004015a7
jmp 0x40afd5
xor eax, eax
push edi
mov byte [ebp - 4], bl
push str.predownload.cfg
mov ecx, eax
mov dword [esi + 0x1b8c], eax
call fcn.00401732
mov ecx, dword [esi + 0x1b8c]
push str.proxy.cfg
call fcn.00401da5
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x113]
mov byte [ebp - 0x114], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x114]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x1004
lea eax, [esi + 0xb88]
push ebx
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x114]
push eax
call sub.MSVCRT.dll_strlen
lea eax, [ebp - 0x114]
push eax
call sub.MSVCRT.dll_strlen
mov ecx, 0x103
sub ecx, eax
lea eax, [ebp - 0x114]
push ecx
push 0x412030
push eax
call dword [sym.imp.MSVCRT.dll_strncat]
mov edi, dword [esi + 0x1b8c]
lea eax, [ebp - 0x114]
push eax
add edi, 0x6562
call sub.MSVCRT.dll_strlen
mov ecx, 0x103
sub ecx, eax
lea eax, [ebp - 0x114]
push ecx
push edi
push eax
call dword [sym.imp.MSVCRT.dll_strncat]
add esp, 0x30
cmp byte [ebp - 0x114], bl
pop edi
je 0x40b0b4
lea eax, [ebp - 0x114]
cmp byte [eax], 0x2f
jne 0x40b0af
mov byte [eax], 0x5c
inc eax
cmp byte [eax], bl
jne 0x40b0a7
lea eax, [ebp - 0x114]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x114]
push eax
lea ecx, [esi + 0x1b90]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
push ebx
call dword [sym.imp.MSVCRT.dll_time]
xor eax, esi
push eax
call dword [sym.imp.MSVCRT.dll_srand]
push 0xb68
lea eax, [esi + 0xc]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [ebp - 0xc]
add esp, 0x14
or dword [ebp - 4], 0xffffffff
mov byte [esi + 4], bl
mov dword [esi + 0xb74], ebx
mov dword [esi + 0xb84], ebx
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x40b5c8
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
and byte [ebp - 0x108], 0
push esi
push edi
push 0x41
pop ecx
xor eax, eax
lea edi, [ebp - 0x107]
push 0x104
push dword [ebp + 8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
lea eax, [ebp - 0x108]
push eax
call fcn.0040b68c
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
mov edi, eax
lea eax, [ebp - 0x108]
push 0x2f
push eax
call esi
add esp, 0x18
test eax, eax
je 0x40b62f
mov byte [eax], 0x5c
inc eax
push 0x2f
push eax
call esi
pop ecx
pop ecx
jmp 0x40b61e
cmp byte [ebp + edi - 0x109], 0x5c
lea eax, [ebp + edi - 0x108]
je 0x40b643
mov byte [eax], 0x5c
lea eax, [ebp - 0x108]
push 0x5c
push eax
call esi
mov edi, eax
pop ecx
test edi, edi
pop ecx
je 0x40b686
and byte [edi], 0
lea eax, [ebp - 0x108]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
pop ecx
cmp eax, 0xffffffff
pop ecx
jne 0x40b67d
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCRT.dll__mkdir]
pop ecx
mov byte [edi], 0x5c
inc edi
push 0x5c
push edi
jmp 0x40b64c
pop edi
mov al, 1
pop esi
leave
ret
Function at 0x40bd8d
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
lea eax, [ebp - 0x100]
push 0xff
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x40bdde
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x40bdde
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
test eax, eax
je 0x40bdde
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
leave
ret
xor eax, eax
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x40c639
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40c650
or eax, eax
jmp 0x40c6bf
mov ecx, dword [ebp + 0x14]
movsx edx, word [ecx]
sub edx, 0
je 0x40c6a8
dec edx
je 0x40c696
dec edx
je 0x40c681
dec edx
je 0x40c669
push 0xfffffffffffffffd
pop eax
jmp 0x40c6bf
add ecx, 0x20a
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.0040d561
add esp, 0x10
jmp 0x40c6bf
add ecx, 0x212
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.0040c9b9
jmp 0x40c67c
add ecx, 2
push ecx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call fcn.0040d66f
jmp 0x40c67c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_connect]
inc eax
neg eax
sbb eax, eax
and eax, 2
dec eax
dec eax
pop esi
pop ebp
ret

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

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40c6e5
cmp eax, dword [esp + 0xc]
jl 0x40c6e5
push 1
pop eax
ret
xor eax, eax
ret

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

Disassembly:
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x18]
mov edi, eax
add edi, dword [esp + 0x1c]
xor esi, esi
mov eax, dword [ebx]
test eax, eax
jle 0x40c72f
sub eax, esi
push 0
push eax
mov eax, dword [esp + 0x1c]
add eax, esi
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x40c738
add esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, edi
jae 0x40c72f
mov eax, dword [ebx]
cmp esi, eax
jl 0x40c703
cmp esi, dword [ebx]
jne 0x40c73c
push 1
pop eax
jmp 0x40c740
mov dword [ebx], eax
jmp 0x40c73e
mov dword [ebx], esi
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x40c9de
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebx
push ebp
push esi
push edi
push 0
mov esi, dword [esp + 0x18]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esi]
call fcn.0040cb65
add esp, 0x14
test eax, eax
jne 0x40ca0a
push 1
pop eax
jmp 0x40cb60
mov eax, dword [esi]
or ebp, 0xffffffff
cmp eax, ebp
je 0x40ca1a
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 0
push 1
pop ebx
push ebx
push 2
call edi
cmp eax, ebp
mov dword [esi], eax
je 0x40cb5e
push ebx
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
call fcn.0040cb65
add esp, 0x14
test eax, eax
jne 0x40ca52
push 2
jmp 0x40ca04
mov eax, dword [esi]
cmp eax, ebp
je 0x40ca5f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push ebx
push 2
call edi
cmp eax, ebp
mov dword [esi], eax
je 0x40cb5e
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
call fcn.0040ccc7
add esp, 0x14
test eax, eax
jne 0x40ca92
push 3
jmp 0x40ca04
mov eax, dword [esi]
cmp eax, ebp
je 0x40ca9f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push ebx
push 2
call edi
cmp eax, ebp
mov dword [esi], eax
je 0x40cb5e
push ebx
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
call fcn.0040ccc7
add esp, 0x14
test eax, eax
jne 0x40cad1
push 4
jmp 0x40ca04
mov eax, dword [esi]
cmp eax, ebp
je 0x40cade
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push ebx
push 2
call edi
cmp eax, ebp
mov dword [esi], eax
je 0x40cb5e
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
call fcn.0040ce78
add esp, 0x14
test eax, eax
jne 0x40cb0d
push 5
jmp 0x40ca04
mov eax, dword [esi]
cmp eax, ebp
je 0x40cb1a
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push ebx
push 2
call edi
cmp eax, ebp
mov dword [esi], eax
je 0x40cb5e
push ebx
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push eax
call fcn.0040ce78
add esp, 0x14
test eax, eax
jne 0x40cb48
push 6
jmp 0x40ca04
mov eax, dword [esi]
cmp eax, ebp
je 0x40cb55
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
push 0
push ebx
push 2
call edi
mov dword [esi], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40cb65
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
and byte [ebp - 0x410], 0
push ebx
push esi
push edi
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x40f]
cmp dword [ebp + 0x18], 0
rep stosd dword es:[edi], eax
mov esi, dword [ebp + 0xc]
stosw word es:[edi], ax
stosb byte es:[edi], al
je 0x40cb9a
mov ebx, 0x1bb
jmp 0x40cba7
mov ax, word [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov ebx, eax
mov edi, dword [ebp + 0x14]
mov word [ebp - 0x10], 2
mov ax, word [edi + 6]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
mov eax, dword [edi + 2]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cbe3
mov eax, 0xfffff830
jmp 0x40cc8a
movzx eax, bx
push eax
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.CONNECT__s:_d_HTTP_1.1_r_nAccept:___r_nContent_Type:_text_html_r_nProxy_Connection:_Keep_Alive_r_nContent_length:_0_r_n_r_n
lea eax, [ebp - 0x410]
push 0x3ff
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
lea eax, [ebp - 0x410]
push eax
call sub.MSVCRT.dll_strlen
mov dword [ebp + 0x18], eax
push eax
lea eax, [ebp - 0x410]
push eax
push dword [ebp + 8]
call fcn.0040c6c2
add esp, 0x24
test eax, eax
jne 0x40cc35
mov eax, 0xfffff832
jmp 0x40cc8a
mov esi, 0x400
xor edi, edi
push esi
lea eax, [ebp - 0x410]
push edi
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 0x18]
push edi
push eax
lea eax, [ebp - 0x410]
push eax
mov dword [ebp + 0x18], esi
push dword [ebp + 8]
call fcn.0040c6e8
add esp, 0x1c
cmp dword [ebp + 0x18], edi
jg 0x40cc70
mov eax, 0xfffff833
jmp 0x40cc8a
lea eax, [ebp - 0x410]
push eax
call fcn.0040cc8f
sub eax, 0xc8
pop ecx
neg eax
sbb eax, eax
and ax, 0xf833
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ccc7
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x894
and byte [ebp - 0x494], 0
push ebx
push esi
mov edx, 0xff
push edi
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x493]
rep stosd dword es:[edi], eax
and byte [ebp - 0x94], 0
push 0x1f
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x93]
and byte [ebp - 0x894], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, edx
xor eax, eax
lea edi, [ebp - 0x893]
cmp dword [ebp + 0x18], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 0xc]
mov ebx, 0x400
mov dword [ebp - 4], ebx
je 0x40cd35
mov dword [ebp + 0x18], 0x1bb
jmp 0x40cd43
mov ax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov dword [ebp + 0x18], eax
mov esi, dword [ebp + 0x14]
mov word [ebp - 0x14], 2
mov ax, word [esi + 6]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [esi + 2]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push 0x10
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40cd7f
mov eax, 0xfffff830
jmp 0x40ce73
lea eax, [esi + 0x108]
add esi, 8
push eax
push esi
mov esi, dword [sym.imp.MSVCRT.dll__snprintf]
push str._s:_s
lea eax, [ebp - 0x94]
push 0x7f
push eax
call esi
add esp, 0x14
lea eax, [ebp - 4]
push 2
push eax
lea eax, [ebp - 0x894]
push eax
lea eax, [ebp - 0x94]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x94]
push eax
call fcn.0040c744
add esp, 0x14
lea eax, [ebp - 0x894]
push eax
movzx eax, word [ebp + 0x18]
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.CONNECT__s:_d_HTTP_1.1_r_nProxy_Authorization:_Basic__s_r_nAccept:___r_nContent_Type:_text_html_r_nProxy_Connection:_Keep_Alive_r_nContent_length:_0_r_n_r_n
lea eax, [ebp - 0x494]
push 0x3ff
push eax
call esi
lea eax, [ebp - 0x494]
push eax
call sub.MSVCRT.dll_strlen
mov dword [ebp - 4], eax
push eax
lea eax, [ebp - 0x494]
push eax
push dword [ebp + 8]
call fcn.0040c6c2
add esp, 0x28
test eax, eax
jne 0x40ce23
mov eax, 0xfffff834
jmp 0x40ce73
xor esi, esi
push ebx
lea eax, [ebp - 0x494]
push esi
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x494]
push eax
mov dword [ebp - 4], ebx
push dword [ebp + 8]
call fcn.0040c6e8
add esp, 0x1c
cmp dword [ebp - 4], esi
jg 0x40ce59
mov eax, 0xfffff835
jmp 0x40ce73
lea eax, [ebp - 0x494]
push eax
call fcn.0040cc8f
sub eax, 0xc8
pop ecx
neg eax
sbb eax, eax
and ax, 0xf835
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40d561
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov ebx, dword [eax]
push edi
mov ax, word [esi + 6]
push 2
pop edi
push eax
mov word [ebp - 0x10], di
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xe], ax
mov eax, dword [esi + 2]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x10]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40d5ad
mov eax, 0xfffffc18
jmp 0x40d66a
mov esi, dword [ebp + 0xc]
push edi
mov byte [ebp - 0x410], 4
mov byte [ebp - 0x40f], 1
lea eax, [esi + 2]
mov dword [ebp + 8], edi
push eax
lea eax, [ebp - 0x40e]
push eax
call sub.MSVCRT.dll_memcpy
add dword [ebp + 8], edi
mov eax, dword [ebp + 8]
add esi, 4
push 4
lea eax, [ebp + eax - 0x410]
push esi
push eax
call sub.MSVCRT.dll_memcpy
add dword [ebp + 8], 4
mov eax, dword [ebp + 8]
and byte [ebp + eax - 0x410], 0
inc dword [ebp + 8]
push dword [ebp + 8]
lea eax, [ebp - 0x410]
push eax
push ebx
call fcn.0040c6c2
add esp, 0x24
test eax, eax
jne 0x40d61b
mov eax, 0xfffffc19
jmp 0x40d66a
push 0x400
lea eax, [ebp - 0x410]
push 0
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp + 8]
push 0
push eax
lea eax, [ebp - 0x410]
push eax
push ebx
mov dword [ebp + 8], 8
call fcn.0040c6e8
add esp, 0x1c
test eax, eax
je 0x40d665
cmp byte [ebp - 0x410], 0
jne 0x40d665
cmp byte [ebp - 0x40f], 0x5a
jne 0x40d665
xor eax, eax
jmp 0x40d66a
mov eax, 0xfffffc1a
pop edi
pop esi
pop ebx
leave
ret