joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4685fc
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push 2
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x46861e
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
leave
ret
push edi
push esi
push esi
push esi
push esi
push dword [ebp + 0x18]
push dword [ebp + 8]
push 1
push 2
push 0x10
push 0x32
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
cmp edi, esi
jne 0x46869f
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x431
je 0x468665
call edi
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
jmp 0x46861b
push 2
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, esi
jne 0x468681
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x468655
push dword [ebp + 0x14]
push esi
push esi
push esi
push esi
push dword [ebp + 0x18]
push dword [ebp + 8]
push 1
push 2
push 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
test eax, eax
je 0x468679
mov eax, dword [ebp + 0x14]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x468657

Function at 0x4686bb
Capabilities:
Delete service

Disassembly:
push edi
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
jne 0x4686d5
pop edi
jmp dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push esi
push 0x10000
push dword [esp + 0x14]
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x468704
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push edi
call ebx
mov eax, esi
pop esi
pop ebx
pop edi
ret
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x468727
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
call edi
push esi
call edi
mov eax, ebx
jmp 0x468700
push esi
call ebx
xor esi, esi
jmp 0x4686fb
Function at 0x46872e
Capabilities:
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push edi
push 0x40000000
xor edi, edi
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x468753
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4687a0
push ebx
push esi
push 0x14
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebx, eax
cmp ebx, edi
jne 0x46877a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push dword [ebp - 4]
jmp 0x4687c6
push 6
mov dword [ebp - 0x20], edi
pop ecx
xor eax, eax
lea edi, [ebp - 0x1c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x4687a3
cmp dword [ebp - 0x1c], 4
jne 0x4687a3
xor eax, eax
pop esi
pop ebx
pop edi
leave
ret
xor edi, edi
push edi
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x4687cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push ebx
call esi
mov eax, edi
jmp 0x46879e
push ebx
call esi
jmp 0x468775

Function at 0x4687d1
Capabilities:
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push esi
push 0x40000000
xor esi, esi
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x4687f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x46881f
push ebx
push edi
push 0x24
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
cmp ebx, esi
jne 0x468822
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop ebx
pop esi
leave
ret
push 6
pop ecx
xor eax, eax
mov dword [ebp - 0x40], esi
lea edi, [ebp - 0x3c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x40]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x46885a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
push ebx
call esi
mov eax, edi
jmp 0x46881d
push 6
mov dword [ebp - 0x24], esi
pop ecx
xor eax, eax
lea edi, [ebp - 0x20]
mov dword [ebp - 8], esi
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
rep stosd dword es:[edi], eax
jmp 0x468880
cmp dword [ebp - 0x20], 1
je 0x468894
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x24]
push eax
push ebx
call esi
test eax, eax
jne 0x468872
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 8], eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, dword [ebp - 8]
jmp 0x468812
Function at 0x4690fc
Capabilities:
Get common file path

Disassembly:
mov eax, 0x50ce41
call fcn.0050b978
sub esp, 0x214
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
push esi
mov dword [ebp - 0x18], ebx
mov esi, dword [ebp + 8]
mov ecx, 0x55ba6c
call fcn.00405b4f
xor esi, esi
mov dword [ebp - 4], ebx
inc esi
push ebx
mov dword [ebp - 0x18], esi
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x14]
push eax
push 0x1a
push ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
push 0x206
lea eax, [ebp - 0x21e]
push ebx
push eax
mov word [ebp - 0x220], bx
call fcn.004ee380
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp - 0x220]
push eax
call fcn.004eecf4
test eax, eax
pop ecx
je 0x46919c
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x220]
push eax
push dword [ebp + 8]
call fcn.00405d27
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 4], esi
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x4691bc
mov eax, dword [ebp - 0x10]
push dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x10]
pop esi
cmp eax, ebx
pop ebx
je 0x4691d4
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov dword fs:[0], ecx
leave
ret

Function at 0x4691e3
Capabilities:
Get common file path

Disassembly:
mov eax, 0x50cd5b
call fcn.0050b978
sub esp, 0x210
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
mov dword [ebp - 4], edi
mov ecx, 0x55ba6c
mov dword [ebp - 0x10], edi
call fcn.00405b4f
push 0x208
lea eax, [ebp - 0x21a]
mov dword [ebp - 4], edi
push edi
push eax
mov dword [ebp - 0x10], 1
mov word [ebp - 0x21c], di
call fcn.004ee380
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x469271
lea eax, [ebp - 0x21c]
push eax
call fcn.004eecf4
test eax, eax
pop ecx
je 0x469271
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x21c]
push eax
push esi
call fcn.00405d27
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x469281
Capabilities:
Create shortcut via ishelllink

Disassembly:
mov eax, 0x50c491
call fcn.0050b978
push ecx
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
xor edi, edi
call dword [sym.imp.ole32.dll_CoInitialize]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x10]
push eax
push 0x5378fc
push 1
push ebx
push 0x53791c
mov byte [ebp - 4], 1
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jl 0x469331
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x50]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x24]
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x2c]
mov eax, dword [esi + 4]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x1c]
push dword [esi + 0x18]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0x44]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push 0x53795c
push eax
call dword [ecx]
cmp eax, ebx
jl 0x469331
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx]
push 1
push eax
push ecx
call dword [edx + 0x18]
cmp eax, ebx
jl 0x469331
inc edi
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x469347
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
cmp eax, ebx
je 0x469358
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret
Function at 0x469c5f
Capabilities:
Check if file exists
Delete file

Disassembly:
mov eax, 0x50e9fc
call fcn.0050b978
sub esp, 0x10
push ebx
push esi
mov esi, ecx
xor ebx, ebx
call fcn.00407dc4
cmp eax, 0xc
jne 0x469d44
lea eax, [ebp - 0x14]
push edi
push eax
call fcn.004690fc
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x14]
mov dword [esp], str.MicrosoftInternet_ExplorerQuick_LaunchUser_PinnedTaskBar_
push eax
call fcn.00406033
mov eax, dword [0x55ba6c]
mov ecx, 0x55ba6c
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
push dword [esi]
lea eax, [ebp - 0x18]
push dword [ebp - 0x14]
push str._s_s.lnk
call fcn.004064fc
add esp, 0xc
lea edi, [esi + 0x1c]
lea eax, [ebp - 0x18]
call fcn.00404ec2
mov edi, dword [ebp - 0x18]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x10]
push eax
call fcn.004691e3
lea eax, [ebp - 0x10]
push eax
mov byte [ebp - 4], 2
call fcn.00469281
mov ebx, eax
test ebx, ebx
pop ecx
pop ecx
je 0x469d25
push dword [esi]
lea ecx, [ebp - 0x10]
push str._s.lnk
call fcn.00428115
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call fcn.00469c25
add esp, 0x10
push dword [ebp - 0x10]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
call fcn.00405892
lea eax, [edi - 0x10]
call fcn.00405892
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.00405892
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
mov eax, ebx
pop ebx
mov dword fs:[0], ecx
leave
ret

Function at 0x469f20
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x55509c]
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 0x469f70
mov ax, word [esp]
cmp al, 2
jne 0x469f6a
cmp ah, al
jne 0x469f6a
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004f3ed4
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.004f3ed4
add esp, 0x194
ret
Function at 0x473c80
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 0x473cb2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0x39
add eax, 0xffffffff
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x473e10
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x140]
test ecx, ecx
je 0x473e2b
mov edx, dword [esi + 0xe4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x473e5f
cmp eax, 2
jg 0x473e5f
mov ecx, dword [esi + 0xe0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x512ce0]
push 2
push edx
call fcn.004f0aee
mov eax, dword [esi + 0xe0]
push eax
push 1
push edi
push ebx
call fcn.004f0aee
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
mov eax, dword [edi + eax*4 + 0xd4]
push esi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4740d5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4740bb
xor eax, eax
pop esi
ret
push eax
push edi
call fcn.0047e6e0
push eax
mov eax, dword [edi]
push str.Send_failure:__s
push eax
call fcn.00473ff0
add esp, 0x14
mov eax, esi
pop esi
ret
Function at 0x474740
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
movzx eax, byte [esi + 0x286]
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 0x474784
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0047e6e0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00473f60
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00473f60
add esp, 8
pop esi
pop ecx
ret
Function at 0x474bd0
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x458]
cmp eax, 0xffffffff
je 0x474c36
mov ecx, dword [ecx + 0x44c]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x474c36
mov ecx, dword [esp + 0xc]
test ecx, ecx
mov eax, dword [eax]
je 0x474bfc
mov dword [ecx], eax
mov ecx, dword [eax + 0xd4]
push esi
mov esi, dword [esp + 0xc]
mov dword [esi], ecx
cmp byte [eax + 0xdc], 0
jne 0x474c2c
mov eax, dword [eax + 0xd4]
push 2
push 1
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x474c32
mov dword [esi], 0xffffffff
pop esi
xor eax, eax
ret
mov ecx, dword [esp + 8]
mov dword [ecx], 0xffffffff
xor eax, eax
ret
Function at 0x476690
Capabilities:
Create thread

Disassembly:
sub esp, 0xc
push ebx
push esi
push 1
push 0x24
call dword [0x554010]
xor ebx, ebx
mov esi, eax
add esp, 8
cmp esi, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
jne 0x4766c2
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
mov eax, dword [edi + 0x2bc]
push ebp
lea ebp, [edi + 0x2bc]
push eax
mov dword [esp + 0x10], ebp
call fcn.0046b1b0
mov ecx, dword [esp + 0x20]
push ecx
call dword [0x55400c]
add esp, 8
cmp eax, ebx
mov dword [ebp], eax
jne 0x476709
push esi
call dword [0x554004]
add esp, 4
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
mov edx, dword [esp + 0x20]
push ebx
push 1
mov dword [edi + 0x2c0], edx
mov byte [edi + 0x2c8], bl
mov dword [edi + 0x2cc], ebx
mov dword [edi + 0x2c4], ebx
mov dword [edi + 0x2d0], esi
push ebx
mov dword [esi + 0xc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x10], eax
jne 0x476746
push ebp
jmp 0x476799
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventW]
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x14], eax
je 0x476794
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [esi + 0x1c], eax
jne 0x476771
mov ecx, dword [esp + 0xc]
push ecx
jmp 0x476799
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x20], eax
jne 0x476786
mov edx, dword [esp + 0xc]
push edx
jmp 0x476799
push ebx
push ebx
push 1
push ebx
call ebp
cmp eax, ebx
mov dword [esi + 0x18], eax
jne 0x4767b2
mov eax, dword [esp + 0xc]
push eax
call fcn.004765b0
add esp, 4
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
lea ecx, [esi + 4]
push ecx
push ebx
push edi
push 0x4764e0
push ebx
push ebx
call fcn.004f18b7
add esp, 0x18
cmp eax, ebx
mov dword [esi], eax
jne 0x4767f1
call fcn.004f5020
mov edx, dword [eax]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0xc]
push eax
call fcn.004765b0
add esp, 4
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x18]
push edx
push 2
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
pop ebp
mov dword [esi + 0xc], eax
pop esi
mov al, 1
pop ebx
add esp, 0xc
ret
Function at 0x476830
Capabilities:
Terminate thread

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x174]
test eax, eax
mov esi, dword [edi + 0x2d0]
mov dword [esp + 0x14], ecx
jne 0x47685d
mov eax, dword [ecx + 0x170]
test eax, eax
jne 0x47685d
mov eax, 0x493e0
push eax
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x10]
push ecx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [esi + 0x14]
push eax
mov dword [esi + 0x10], 0
call ebx
test ebp, ebp
mov dword [esi + 0x14], 0
mov bl, 1
jne 0x4768b9
mov ecx, dword [esi]
push 0x1388
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x47690f
mov edx, dword [esi]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea ebp, [esi + 8]
mov byte [edi + 0x2c8], bl
mov dword [ebp], 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4768d9
mov edx, dword [edi + 0x2c4]
mov dword [eax], edx
xor esi, esi
cmp dword [edi + 0x2c4], esi
jne 0x4769c0
mov ebp, dword [ebp]
cmp ebp, 0x1b
jne 0x47692b
push ebp
mov esi, ebp
call fcn.0047dda0
push eax
mov eax, dword [esp + 0x1c]
push str.Could_not_resolve_host:__s
push eax
call fcn.00473ff0
add esp, 0x10
jmp 0x4769c0
mov eax, dword [edi + 0x2cc]
push eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esi]
lea ebp, [esi + 8]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x4768c9
cmp byte [edi + 0x2c8], 0
je 0x476991
cmp byte [edi + 0x12b], 0
mov ecx, dword [edi + 0x2cc]
push ecx
push edi
je 0x47696b
call fcn.0047e6e0
mov edx, dword [edi + 0xa0]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_proxy:__s___s
push eax
call fcn.00473ff0
add esp, 0x18
mov esi, 5
jmp 0x4769c0
call fcn.0047e6e0
mov edx, dword [edi + 0x8c]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_host:__s___s
push eax
call fcn.00473ff0
add esp, 0x18
mov esi, 6
jmp 0x4769c0
cmp ebp, 0xffffffff
je 0x4769a2
cmp dword [edi + 0x2cc], 0x2afc
jne 0x4769bb
mov ecx, dword [edi + 0x8c]
mov edx, dword [esp + 0x14]
push ecx
push str.Resolving_host_timed_out:__s
push edx
call fcn.00473ff0
add esp, 0xc
mov esi, 0x1c
lea eax, [edi + 0x2bc]
push eax
call fcn.004765b0
add esp, 4
cmp dword [edi + 0x2c4], 0
mov eax, esi
jne 0x4769e0
mov byte [edi + 0x128], bl
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x476a90
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
mov ebx, dword [edi]
lea ecx, [esp + 0x10]
push ecx
push esi
push 2
mov dword [eax], 0
call fcn.0047e900
add esp, 0xc
test eax, eax
jle 0x476ad4
mov edx, dword [esp + 0x18]
push edx
push esi
lea eax, [esp + 0x18]
push eax
push 2
call fcn.00476300
add esp, 0x10
pop edi
pop esi
pop ebx
ret
push ebp
mov ebp, dword [esp + 0x1c]
push ebp
push esi
call fcn.00476690
add esp, 8
test al, al
je 0x476af8
mov ecx, dword [esp + 0x20]
pop ebp
pop edi
pop esi
mov dword [ecx], 1
xor eax, eax
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.0047e6e0
push eax
push esi
push str.init_resolve_thread___failed_for__s___s_n
push ebx
call fcn.00473f60
add esp, 0x18
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x476b45
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.0047e6e0
push eax
push ebp
push esi
push str.gethostbyname_2__failed_for__s:_d___s_n
push ebx
call fcn.00473f60
add esp, 0x1c
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
ret
push ebp
push eax
call fcn.004761d0
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x479d50
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
sub esp, 0x31c
push ebx
mov ebx, dword [esp + 0x324]
push ebp
mov ebp, dword [esp + 0x32c]
push esi
xor esi, esi
cmp ebx, 0xffffffff
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], esi
jne 0x479d90
cmp ebp, ebx
jne 0x479d90
mov eax, dword [esp + 0x334]
call fcn.00479d30
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret
push edi
mov edi, dword [esp + 0x338]
cmp edi, esi
jle 0x479dab
mov esi, edi
call fcn.0047b510
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor eax, eax
xor ecx, ecx
or edx, 0xffffffff
cmp ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x124], eax
je 0x479ddf
mov ecx, 1
mov dword [esp + 0x128], ebx
mov dword [esp + 0x124], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov edx, ebx
cmp ebp, 0xffffffff
mov dword [esp + 0x228], eax
je 0x479e26
test ecx, ecx
mov dword [esp + 0x22c], ebp
mov dword [esp + 0x228], 1
jbe 0x479e0e
cmp dword [esp + eax*4 + 0x24], ebp
je 0x479e0e
add eax, 1
cmp eax, ecx
jb 0x479e01
cmp eax, ecx
jne 0x479e20
cmp ecx, 0x40
jae 0x479e20
mov dword [esp + eax*4 + 0x24], ebp
add dword [esp + 0x20], 1
cmp ebp, edx
jbe 0x479e26
mov edx, ebp
xor ebx, ebx
test edi, edi
setl bl
lea eax, [esp + 0x18]
lea ebp, [edx + 1]
sub ebx, 1
and ebx, eax
lea esp, [esp]
xor eax, eax
cmp edi, eax
jle 0x479e71
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0x3e8
mov ecx, esi
sub ecx, eax
imul ecx, ecx, 0x3e8
mov dword [esp + 0x1c], ecx
jmp 0x479e7b
jne 0x479e7b
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push ebx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x230]
push eax
lea ecx, [esp + 0x130]
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x479ee5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x479eae
cmp eax, 0x2714
jne 0x479ee9
test edi, edi
jle 0x479e40
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
call fcn.0047b510
push edx
push eax
call fcn.0047b540
mov esi, edi
sub esi, eax
add esp, 0x10
test esi, esi
jg 0x479e40
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
test eax, eax
jge 0x479ef7
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
jne 0x479f06
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
mov edi, dword [esp + 0x330]
xor esi, esi
cmp edi, 0xffffffff
je 0x479f3d
lea ecx, [esp + 0x124]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x479f2b
mov esi, 1
lea edx, [esp + 0x20]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x479f3d
or esi, 4
mov edi, dword [esp + 0x334]
cmp edi, 0xffffffff
je 0x479f70
lea eax, [esp + 0x228]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x479f5e
or esi, 2
lea ecx, [esp + 0x20]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x479f70
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret