joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45e740
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4b05f3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.004a1f77
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004a76e9
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.004a8c41
test eax, eax
je 0x45e85c
mov ecx, dword [esp + 0x3c]
call fcn.004a7716
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x45e820
push edi
mov ecx, esi
call fcn.004a4ce0
mov ecx, esi
call fcn.0045e9c0
cmp dword [esp + 0x38], 1
jne 0x45e855
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.004a4e4a
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x461290
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4612c3
push esi
call fcn.00464390
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4612bc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x461349
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x461332
mov eax, dword [esi + 8]
test eax, eax
je 0x4612e7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x46132e
cmp eax, 2
je 0x461332
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4612da
cmp eax, 3
je 0x46130d
cmp eax, 1
jne 0x4612da
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4612da
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4612da
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00461370
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x461358
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00461370
add esp, 4
pop esi
ret

Function at 0x46ced0
Capabilities:
Capture webcam image

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov eax, dword [eax + 4]
cmp dword [esi + 0xec], 1
jne 0x46cf73
test eax, eax
jbe 0x46cf73
mov ecx, dword [esi + 0xbc]
test ecx, ecx
jle 0x46cf73
mov ecx, dword [esi + 0x1c]
push edi
push 0
push eax
push 0x419
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, eax
mov eax, dword [esi + 0xbc]
inc edi
test eax, eax
jne 0x46cf1e
xor esi, esi
jmp 0x46cf24
mov esi, dword [esi + 0xb4]
add esi, 4
xor ebx, ebx
test edi, edi
jbe 0x46cf4f
push ebp
mov ebp, edi
add esi, 6
push esi
call fcn.0046ee80
add esi, eax
push esi
mov ebx, esi
call fcn.0046ee80
add esp, 8
add esi, eax
dec edi
dec ebp
jne 0x46cf30
pop ebp
test edi, edi
pop edi
jne 0x46cf73
test ebx, ebx
je 0x46cf73
mov edx, dword [esp + 0x10]
push 0x4e
add edx, 0x10
push ebx
push edx
call fcn.00490a80
add esp, 0xc
mov eax, 1
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc
Function at 0x46d0b5
Capabilities:
Capture webcam image

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x46d1cd
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x46d1cd
mov eax, dword [esi + 0x3c]
push eax
call fcn.004a23c9
mov esi, eax
test esi, esi
je 0x46d1cd
mov ebx, dword [esp + 0x58]
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push ebx
push 0x419
push ecx
call ebp
mov edi, eax
test edi, edi
jl 0x46d1cd
mov ecx, esi
call fcn.0046d020
cmp edi, eax
jge 0x46d1cd
mov eax, dword [esi + 0xc4]
mov edx, dword [esi + 0xc0]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
xor ecx, ecx
mov dword [esp + 0x28], edx
cmp eax, ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], edi
jne 0x46d153
mov dword [esp + 0x34], 1
jmp 0x46d1ae
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push ebx
push 0x433
push edx
call ebp
test eax, eax
je 0x46d1cd
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], ecx
mov dword [eax], 0
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x10]
add edx, 2
push eax
push ecx
mov dword [esp + 0x1c], edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], 3
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], eax
xor ecx, ecx
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x7d8
call fcn.0046c5d0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x44
ret 0xc
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x44
ret 0xc

Function at 0x473650
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x5c0b48]
xor edx, edx
cmp eax, edx
jne 0x473676
xor eax, eax
mov byte [eax + 0x5c0a48], al
inc eax
cmp eax, 0x100
jl 0x47365e
mov dword [0x5c0b48], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x5c0a48
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x473707
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x4736da
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x4736a8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x473710
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x473763
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x47374a
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x47a110
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b0f4e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.0047aa30
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x58277c
call fcn.004a0693
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x47a1a3
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.004a0693
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x47a19c
push 0
mov ecx, eax
call fcn.00471280
mov dword [esi + 0xc], eax
jmp 0x47a1a5
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x47a1a5
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x4a2d6c
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4a2da4
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004a0df9
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004a0dd1
jmp 0x4a2db0
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4a4466
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4a44a8
call fcn.004aa148
mov esi, dword [eax + 0xc]
push pe_nt_image_headers32
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4a44a8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4a449f
xor eax, eax
jmp 0x4a44b0
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004a44b6
pop edi
pop esi
pop ebx
ret 4
Function at 0x4aa678
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4aa6a6
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4aa6c4
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004aa5de
jmp 0x4aa6c4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4aa6c4
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004aa5de
test edi, edi
mov eax, edi
jne 0x4aa6ae
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8

Function at 0x40100b
Capabilities:
Query or enumerate registry value

Disassembly:
call 0x40100b
push eax
call sub.KERNEL32.dll_ExitProcess
push ebp
mov ebp, esp
add esp, 0xfffffef0
jmp 0x40109c
lea eax, [ebp - 0x104]
push eax
call fcn.004011ec
push 0x401019
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
jne 0x401165
lea eax, [ebp - 0x10c]
push eax
push 0x20019
push 0
push 0x401038
push 0x80000001
call sub.ADVAPI32.dll_RegOpenKeyExA
cmp eax, 0
jne 0x4011a5
mov dword [ebp - 0x110], 0x103
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
push 0
push 0
push 0x401052
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegQueryValueExA
push eax
push dword [ebp - 0x10c]
call sub.ADVAPI32.dll_RegCloseKey
pop eax
cmp eax, 0
jne 0x4011a5
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrlenA
lea ebx, [ebp - 0x104]
add ebx, eax
dec ebx
cmp byte [ebx], 0x5c
je 0x40114a
mov word [ebx], 0x5c
push 0x401023
lea eax, [ebp - 0x104]
push eax
call sub.KERNEL32.dll_lstrcatA
push eax
call sub.KERNEL32.dll_LoadLibraryA
test eax, eax
je 0x4011a5
mov dword [ebp - 0x108], eax
push 0x40102d
push eax
call sub.KERNEL32.dll_GetProcAddress
test eax, eax
je 0x40119a
push 0x3e8
call eax
test eax, eax
je 0x40119a
call 0x40118a
add dword [esp], 0x1e76
call eax
push 0
call sub.KERNEL32.dll_ExitProcess
push dword [ebp - 0x108]
call sub.KERNEL32.dll_FreeLibrary
push 0x10
push 0x401096
push 0x401057
push 0
call sub.USER32.dll_MessageBoxA
mov eax, 0xffffffff
leave
ret
Function at 0x401080
Capabilities:
Accept command line arguments
Initialize winsock library

Disassembly:
sub esp, 0x190
push esi
push edi
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 0xa]
mov word [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4010d3
push 0xffffffffffffffff
call fcn.0040a020
push eax
push str.WSAStartup_failed:__s
call fcn.00409f30
add esp, 8
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x190
ret
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push str.GetCommandLine:__s
call fcn.00409f30
mov eax, dword [esp + 0x1a4]
add esp, 8
cmp eax, 4
je 0x40119c
cmp eax, 3
je 0x4011bd
cmp eax, 2
jne 0x40118b
push 0x498
call fcn.00420528
mov esi, eax
add esp, 4
test esi, esi
je 0x40118b
push esi
call fcn.00401d40
mov ecx, dword [esp + 0x1a0]
mov edx, dword [ecx + 4]
push edx
call fcn.0042051d
mov dword [esi + 8], eax
push 0x4340fc
push 0x434108
lea eax, [esi + 0xc]
push 0x80
push eax
call fcn.00420441
add esp, 0x14
lea ecx, [esi + 0x8c]
push 0x400
push ecx
push str.libpub.dll
call fcn.004018b0
push eax
call fcn.0040a0d0
push esi
call fcn.00401d80
test eax, eax
push esi
jne 0x40117d
call fcn.00401e40
push esi
call fcn.00402000
push esi
call fcn.004203d8
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
xor eax, eax
pop esi
add esp, 0x190
ret
mov eax, dword [esp + 0x1a0]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
call fcn.004044c0
pop edi
pop esi
add esp, 0x190
ret
mov eax, dword [esp + 0x1a0]
mov ecx, dword [eax + 4]
push ecx
call fcn.0042051d
add esp, 4
test eax, eax
je 0x4011e6
push 0
push 1
call fcn.00402680
pop edi
pop esi
add esp, 0x190
ret
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
push 0
push 0
call fcn.00402680
test eax, eax
je 0x401191
push 0x3e8
call edi
inc esi
cmp esi, 8
jl 0x4011ee
jne 0x4010c7
push 1
push 0
call fcn.00402680
pop edi
pop esi
add esp, 0x190
ret
Function at 0x4013a0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x21c
push ebx
mov ebx, dword [esp + 0x224]
push ebp
lea eax, [esp + 8]
push esi
push eax
mov esi, 1
push 0x8004667e
push ebx
mov dword [esp + 0x18], esi
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x4013dc
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x21c
ret 0x10
mov ecx, dword [esp + 0x234]
mov edx, dword [esp + 0x230]
push ecx
xor ebp, ebp
push edx
push ebx
mov dword [esp + 0x1c], ebp
call sub.WS2_32.dll_connect
test eax, eax
je 0x4014fb
mov edx, dword [esp + 0x238]
xor ecx, ecx
cmp edx, 0x7fffffff
ja 0x401413
mov ecx, edx
mov eax, 0x431bde83
push edi
mul edx
shr edx, 0x12
mov dword [esp + 0x1c], edx
mov eax, ecx
xor edx, edx
mov ecx, 0xf4240
div ecx
mov dword [esp + 0x24], esi
mov ecx, 0x41
lea esi, [esp + 0x24]
lea edi, [esp + 0x128]
mov dword [esp + 0x28], ebx
lea eax, [esp + 0x128]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
lea edx, [ebx + 1]
push ecx
push edx
call sub.WS2_32.dll_select
test eax, eax
pop edi
jne 0x401491
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ebp
push eax
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x21c
ret 0x10
lea ecx, [esp + 0x20]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4014b2
lea edx, [esp + 0x124]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4014fb
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push ebx
mov dword [esp + 0x28], 4
call sub.WS2_32.dll_getsockopt
test eax, eax
jge 0x4014fb
lea edx, [esp + 0xc]
mov dword [esp + 0xc], ebp
push edx
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x21c
ret 0x10
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ebp
push eax
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x401522
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x21c
ret 0x10
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x40153e
pop esi
mov dword [0x43b7b4], eax
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x21c
ret 0x10
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x21c
ret 0x10
Function at 0x401550
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x18]
push ebx
push esi
push edi
mov edi, dword [esp + 0x28]
mov dword [esp + 0xc], 0
test eax, eax
jne 0x40157a
test edi, edi
jge 0x40157a
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0x14
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
test esi, esi
jne 0x401592
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0x14
mov eax, dword [esp + 0x2c]
cmp eax, 1
jne 0x4015a0
push 6
push eax
jmp 0x4015a3
push 0
push eax
push 2
call sub.WS2_32.dll_socket
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4015bc
pop edi
pop esi
or eax, eax
pop ebx
add esp, 0x14
ret 0x14
xor eax, eax
push edi
mov dword [esp + 0x14], eax
mov word [esp + 0x14], 2
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
call sub.WS2_32.dll_htons
lea edi, [esp + 0x14]
push 4
mov word [esp + 0x16], ax
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x18], eax
mov edx, dword [esi + 0xc]
movsx ecx, word [esi + 0xa]
mov esi, dword [edx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
mov esi, 0x1388
push ecx
push 0x1005
push 0xffff
push ebx
mov dword [esp + 0x38], esi
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x40163d
push ebx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0x14
lea edx, [esp + 0x24]
push 4
push edx
push 0x1006
push 0xffff
push ebx
mov dword [esp + 0x38], esi
call sub.WS2_32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x40166f
push ebx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0x14
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 3
push eax
push 0x10
push ecx
push ebx
call fcn.004013a0
mov esi, eax
test esi, esi
jge 0x4016a4
push ebx
call sub.WS2_32.dll_closesocket
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x14
ret 0x14
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4016db
lea edx, [esp + 0xc]
mov dword [esp + 0xc], 1
push edx
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x4016db
push ebx
call sub.WS2_32.dll_closesocket
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x14
ret 0x14
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x14
ret 0x14
Function at 0x401840
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x18]
test ebp, ebp
je 0x40189f
mov ebx, dword [esp + 0x14]
cmp dword [ebp], 0
je 0x40189f
test esi, esi
jle 0x40189f
push 0
push esi
push edi
push ebx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x401876
add edi, eax
sub esi, eax
jmp 0x401858
je 0x401895
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x40188b
cmp eax, 0x2714
jne 0x401895
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401858
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 0x10
mov eax, dword [esp + 0x1c]
pop edi
sub eax, esi
pop esi
pop ebp
pop ebx
ret 0x10

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

Disassembly:
sub esp, 0x800
push ebx
push ebp
push esi
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x814]
stosw word es:[edi], ax
test ebp, ebp
stosb byte es:[edi], al
je 0x401d33
mov esi, dword [esp + 0x820]
test esi, esi
je 0x401d33
mov eax, dword [ebp + 4]
test eax, eax
je 0x401d33
mov eax, dword [esp + 0x818]
lea edi, [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x81c]
mov ecx, eax
mov dword [esp + 0x14], eax
mov edx, ecx
mov ebx, dword [sym.imp.WS2_32.dll_send]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [eax + 8]
lea edi, [esp + 0x10]
test esi, esi
jle 0x401d33
mov eax, dword [ebp]
push 0
push esi
push edi
push eax
call ebx
test eax, eax
jle 0x401cd7
sub esi, eax
add edi, eax
jmp 0x401ced
je 0x401d01
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x401ced
cmp eax, 0x2714
jne 0x401d14
mov eax, dword [ebp + 4]
test eax, eax
jne 0x401cbf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret 0x10
push 0xffffffffffffffff
call fcn.0040a020
mov ecx, dword [ebp]
push eax
push ecx
push str.Session:__d_Broken:__s
jmp 0x401d24
push eax
call fcn.0040a020
mov edx, dword [ebp]
push eax
push edx
push str.Session:__d_Down:__s
call fcn.00409f30
add esp, 0xc
mov dword [ebp + 4], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret 0x10
Function at 0x4020e0
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x30
push ebp
push esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0xc], 0xffffffff
push esi
push str.try_starting_service:__s
call fcn.00409f30
add esp, 8
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x3c], ebp
jne 0x402138
push 0xffffffffffffffff
call fcn.0040a020
push eax
push 0x4344e8
call fcn.00409f30
add esp, 8
or eax, 0xffffffff
pop esi
pop ebp
add esp, 0x30
ret 8
push 0xf01ff
push esi
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x402172
push 0xffffffffffffffff
call fcn.0040a020
push eax
push 0x4344f4
call fcn.00409f30
add esp, 8
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x30
ret 8
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4021c3
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x4021a4
pop esi
xor eax, eax
pop ebp
add esp, 0x30
ret 8
push eax
call fcn.0040a020
push eax
push 0x434500
call fcn.00409f30
add esp, 8
or eax, 0xffffffff
pop esi
pop ebp
add esp, 0x30
ret 8
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push 0x24
push ecx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
jne 0x4021fc
push 0xffffffffffffffff
call fcn.0040a020
push eax
push 0x43450c
call fcn.00409f30
add esp, 8
or eax, 0xffffffff
pop esi
pop ebp
add esp, 0x30
ret 8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call ebx
mov edx, dword [esp + 0x30]
mov edi, eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], edx
test eax, eax
je 0x4022c2
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x48]
cmp dword [eax], 0
je 0x4022be
cmp dword [esp + 0x20], 2
jne 0x4022be
mov eax, 0xcccccccd
mul dword [esp + 0x34]
shr edx, 3
cmp edx, 0x3e8
jae 0x402255
mov edx, 0x3e8
jmp 0x402262
cmp edx, 0x2710
jbe 0x402262
mov edx, 0x7d0
push edx
call ebp
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push 0x24
push edx
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x4022a9
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jbe 0x402298
call ebx
mov ecx, dword [esp + 0x30]
mov edi, eax
mov dword [esp + 0x10], ecx
jmp 0x402222
call ebx
mov ecx, dword [esp + 0x34]
sub eax, edi
cmp eax, ecx
ja 0x4022be
jmp 0x402222
push 0xffffffffffffffff
call fcn.0040a020
push eax
push str.Error:__s
call fcn.00409f30
add esp, 8
mov ebp, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
pop edi
cmp eax, 4
pop ebx
jne 0x4022d5
mov dword [esp + 0xc], 0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebp
call esi
pop esi
pop ebp
mov eax, dword [esp + 4]
add esp, 0x30
ret 8