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

Disassembly:
mov eax, dword [0x40842e]
test eax, eax
jg 0x403b8c
and dword [0x4083f4], 0
xor eax, eax
ret
push edi
push esi
mov esi, 0x800
cmp eax, esi
ja 0x403b99
mov esi, eax
mov edi, dword [sym.imp.KERNEL32.dll__lread]
push esi
push dword [0x4083f0]
push dword [0x407e14]
call edi
cmp dword [0x407e24], 0
mov ecx, eax
mov dword [0x4083f4], ecx
je 0x403c08
cmp ecx, 0xffffffff
je 0x403c08
cmp ecx, esi
je 0x403c19
test ecx, ecx
jl 0x403c08
mov ax, word [0x4078d8]
push dword [0x407e28]
inc ax
push eax
call fcn.0040132a
mov ecx, dword [0x4083f4]
test ecx, ecx
jne 0x403c01
push esi
push dword [0x4083f0]
push dword [0x407e14]
call edi
mov ecx, eax
mov dword [0x4083f4], ecx
cmp ecx, 0xffffffff
je 0x403c08
mov esi, ecx
cmp ecx, esi
je 0x403c19
push 2
call fcn.00401d71
mov ecx, dword [0x4083f4]
sub dword [0x40842e], ecx
mov esi, dword [0x4083f0]
cmp dword [0x407e18], 0
mov dword [0x40843c], esi
je 0x403c5b
mov eax, ecx
mov edx, eax
dec eax
test edx, edx
je 0x403c5b
lea edi, [eax + 1]
call fcn.004054cc
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.004054e2
inc esi
dec edi
pop ecx
jne 0x403c40
mov ecx, dword [0x4083f4]
mov eax, ecx
dec ecx
pop esi
mov dword [0x4083f4], ecx
pop edi
ret

Function at 0x4054e2
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x407e80]
xor eax, ecx
mov edx, 0xff
and eax, edx
push esi
shr ecx, 8
mov eax, dword [eax*4 + 0x407ec0]
xor eax, ecx
mov ecx, dword [0x407e88]
mov dword [0x407e80], eax
and eax, edx
add eax, dword [0x407e84]
mov esi, ecx
and esi, edx
imul eax, eax, 0x8088405
inc eax
mov dword [0x407e84], eax
shr eax, 0x18
xor esi, eax
shr ecx, 8
mov eax, dword [esi*4 + 0x407ec0]
pop esi
xor eax, ecx
mov dword [0x407e88], eax
ret

Function at 0x4055c9
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
push dword [0x407e20]
call fcn.0040553d
pop ecx
lea eax, [ebp - 0xc]
push 0xc
push dword [ebp + 8]
push eax
call fcn.00401000
add esp, 0xc
xor edi, edi
lea esi, [ebp + edi - 0xc]
call fcn.004054cc
xor byte [esi], al
movzx eax, byte [esi]
push eax
call fcn.004054e2
inc edi
pop ecx
cmp edi, 0xc
jl 0x4055f0
cmp dword [0x407e1c], 0
movzx ax, byte [ebp - 1]
je 0x405623
xor ecx, ecx
mov cl, byte [0x408427]
jmp 0x40562c
mov ecx, dword [0x40842a]
shr ecx, 0x18
cmp ax, cx
je 0x405636
or eax, 0xffffffff
jmp 0x405638
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x4012c0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x348
mov eax, dword [0x427c20]
xor eax, esp
mov dword [esp + 0x344], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
push edi
lea ecx, [esp + 0xc]
call fcn.00401ad0
mov eax, dword [esp + 8]
cmp dword [eax - 0xc], 0
je 0x4013f1
push 0x114
lea ecx, [esp + 0x2c]
push 0
push ecx
call fcn.00410380
add esp, 0xc
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 8]
cmp dword [eax - 0xc], 0
jl 0x401365
push 0x4226f0
push eax
call fcn.0040d9d9
add esp, 8
test eax, eax
je 0x401365
sub eax, dword [esp + 8]
sar eax, 1
js 0x401365
lea esi, [esp + 0xc]
call fcn.00402660
mov eax, esi
push eax
mov ecx, edi
call fcn.00402710
test eax, eax
jl 0x4013e4
mov ecx, esi
push ecx
jmp 0x4013df
cmp dword [esp + 0x2c], 5
jbe 0x4013c5
push 0x104
lea edx, [esp + 0x144]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x422700
lea ecx, [esp + 0xc]
call fcn.00401430
push 0x4226f0
lea ecx, [esp + 0xc]
call fcn.00401430
mov edx, dword [esp + 8]
cmp dword [edx - 4], 1
jle 0x4013b7
mov eax, dword [edx - 0xc]
push eax
lea ecx, [esp + 0xc]
call fcn.00401850
mov edx, dword [esp + 8]
lea ecx, [esp + 0x140]
call section..text
jmp 0x4013ed
lea esi, [esp + 0xc]
call fcn.00402660
mov ecx, esi
push ecx
mov ecx, edi
call fcn.00402710
test eax, eax
jl 0x4013e4
mov edx, esi
push edx
call fcn.00402dd0
lea esi, [esp + 0xc]
call fcn.004026c0
mov eax, dword [esp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40140d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x34c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040d89f
mov esp, ebp
pop ebp
ret 0x10

Function at 0x401580
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x401599
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4015d4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4015d0
lea ebx, [ebx]
cmp esi, eax
jae 0x4015d4
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4015c0
cmp esi, eax
jb 0x4015da
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x401bd0
Capabilities:
Parse url

Disassembly:
mov eax, 0x109c
call fcn.00410c10
mov eax, dword [0x427c20]
xor eax, esp
mov dword [esp + 0x1098], eax
mov eax, dword [esp + 0x10a0]
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCanonicalizeUrlW]
push ebp
mov ebp, dword [esp + 0x10ac]
push esi
mov esi, edx
push 0x2000000
lea edx, [esp + 0x10]
mov dword [esp + 0x14], eax
push edx
lea eax, [esp + 0x64]
push eax
push esi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], 0x824
mov dword [esp + 0x24], 0
call ebx
test eax, eax
jne 0x401c9c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401c82
mov eax, dword [esp + 0xc]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004039e3
add esp, 4
push 0x2000000
lea ecx, [esp + 0x10]
push ecx
push eax
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 1
call ebx
test eax, eax
jne 0x401ca2
mov edx, dword [esp + 0x18]
push edx
call fcn.004039ee
add esp, 4
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1098]
xor ecx, esp
call fcn.0040d89f
add esp, 0x109c
ret
lea ebx, [esp + 0x5c]
jmp 0x401ca6
mov ebx, dword [esp + 0x18]
push 0x3c
lea eax, [esp + 0x24]
push 0
push eax
call fcn.00410380
mov eax, dword [edi]
sub eax, 0x10
mov esi, 0x824
mov dword [esp + 0x2c], 0x3c
mov dword [esp + 0x40], esi
mov edx, dword [eax + 8]
mov ecx, 1
sub ecx, dword [eax + 0xc]
sub edx, 0x825
add esp, 0xc
or ecx, edx
jge 0x401cee
push 0x825
mov ecx, edi
call fcn.00401910
mov eax, dword [edi]
mov dword [esp + 0x30], eax
mov eax, dword [ebp]
sub eax, 0x10
mov dword [esp + 0x50], esi
mov edx, dword [eax + 8]
mov ecx, 1
sub ecx, dword [eax + 0xc]
sub edx, 0x825
or ecx, edx
jge 0x401d1f
push 0x825
mov ecx, ebp
call fcn.00401910
mov eax, dword [ebp]
lea ecx, [esp + 0x20]
push ecx
push 0
push 0
push ebx
mov dword [esp + 0x5c], eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
cmp dword [esp + 0x14], 0
mov esi, eax
je 0x401d48
push ebx
call fcn.004039ee
add esp, 4
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x401d63
push ecx
push eax
call fcn.0040da3a
add esp, 8
test eax, eax
jl 0x401dfd
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x401dfd
mov dword [ecx - 0xc], eax
mov edx, dword [edi]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [ebp]
mov ecx, dword [eax - 8]
test eax, eax
je 0x401d91
push ecx
push eax
call fcn.0040da3a
add esp, 8
test eax, eax
jl 0x401dfd
mov ecx, dword [ebp]
cmp eax, dword [ecx - 8]
jg 0x401dfd
mov dword [ecx - 0xc], eax
mov edx, dword [ebp]
xor ecx, ecx
mov word [edx + eax*2], cx
test esi, esi
jne 0x401dcd
mov edx, dword [esp + 0x10]
mov eax, esi
pop esi
pop ebp
mov dword [edx], 0xffffffff
pop ebx
mov ecx, dword [esp + 0x1098]
xor ecx, esp
call fcn.0040d89f
add esp, 0x109c
ret
mov ax, word [esp + 0x38]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
mov word [ecx], ax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10a4]
mov dword [eax], edx
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040d89f
add esp, 0x109c
ret
push 0x80070057
call fcn.00401990
int3
Function at 0x401fa0
Capabilities:
Connect to http server

Disassembly:
mov eax, dword [esi]
mov eax, dword [eax]
sub esp, 8
push 0
push 0
push 3
push 0
push 0
push ecx
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 4], eax
test eax, eax
jne 0x401fc9
xor al, al
add esp, 8
ret 8
mov ecx, dword [esp + 0x10]
push 0
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 8]
push edx
push 0
push str.HTTP_1.1
push ecx
push 0x4228d8
push eax
mov dword [esp + 0x20], 0x422734
mov dword [esp + 0x24], 0
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
test eax, eax
mov dword [esi + 8], eax
setne al
add esp, 8
ret 8

Function at 0x402010
Capabilities:
Read data from internet
Receive data

Disassembly:
push 0xffffffffffffffff
push 0x41dedb
mov eax, dword fs:[0]
push eax
sub esp, 0x410
mov eax, dword [0x427c20]
xor eax, esp
mov dword [esp + 0x40c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x427c20]
xor eax, esp
push eax
lea eax, [esp + 0x424]
mov dword fs:[0], eax
mov eax, dword [esp + 0x438]
mov ebp, dword [esp + 0x434]
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ebx
or edi, 0xffffffff
call fcn.00403df3
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x402080
push 0x80004005
call fcn.00401990
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
lea ecx, [esp + 0x18]
push ecx
push 0x3ff
lea edx, [esp + 0x28]
mov dword [esp + 0x434], ebx
mov eax, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
je 0x40210e
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x40210a
mov byte [esp + eax + 0x20], bl
lea eax, [esp + 0x20]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4020c7
sub eax, edx
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x18]
push edx
mov edx, eax
call fcn.00402170
cmp edi, ebx
jle 0x4020ed
sub edi, dword [esp + 0x18]
cmp edi, ebx
jle 0x40210a
mov edx, dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
push 0x3ff
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, ebx
jne 0x4020b4
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
push esi
mov ecx, edi
call fcn.00402410
lea eax, [esi - 0x10]
mov dword [esp + 0x42c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402141
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x424]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.0040d89f
add esp, 0x41c
ret 8
Function at 0x403260
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push esi
push edi
push 0
push 0
push 0
push 0
push str.StartPage
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
test edi, edi
je 0x403338
push 0x800
call fcn.004039e3
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
push str._startpage_index.html_hcode_s
push esi
call fcn.0040df67
add esp, 0x10
push 0
push 0
push 3
push 0
push 0
push 0x50
push str.start.tiara.daum.net
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
test eax, eax
je 0x403338
push 0
push 0x80000000
push 0
push 0
push str.HTTP_1.1
push esi
push 0x4228d8
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov edi, eax
test edi, edi
je 0x403338
push 0
push 0
push 0
push 0
push edi
mov dword [esp + 0x20], 0
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x403338
push ebx
push 0x800
call fcn.004039e3
add esp, 4
lea ecx, [esp + 0x10]
push ecx
push 0x3ff
mov ebx, eax
push ebx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call fcn.004039ee
push esi
call fcn.004039ee
add esp, 8
pop ebx
pop edi
xor eax, eax
pop esi
ret 4
pop edi
or eax, 0xffffffff
pop esi
ret 4

Function at 0x40d89f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x427c20]
jne 0x40d8a9
repz ret
jmp fcn.00411c52
Function at 0x417b32
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00411661
and dword [ebp - 4], 0
cmp dword [0x42b9f0], 0
mov ebx, eax
jne 0x417be3
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x417c94
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x417c94
push eax
call fcn.004115ef
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42b9f0], eax
call esi
push eax
call fcn.004115ef
mov dword [esp], 0x4214a4
push edi
mov dword [0x42b9f4], eax
call esi
push eax
call fcn.004115ef
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x42b9f8], eax
call esi
push eax
call fcn.004115ef
pop ecx
mov dword [0x42ba00], eax
test eax, eax
je 0x417be3
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004115ef
pop ecx
mov dword [0x42b9fc], eax
mov eax, dword [0x42b9fc]
cmp eax, ebx
je 0x417c3b
cmp dword [0x42ba00], ebx
je 0x417c3b
push eax
call fcn.0041166a
push dword [0x42ba00]
mov esi, eax
call fcn.0041166a
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x417c3b
test edi, edi
je 0x417c3b
call esi
test eax, eax
je 0x417c32
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x417c32
test byte [ebp - 0xc], 1
jne 0x417c3b
or dword [ebp + 0x10], 0x200000
jmp 0x417c74
mov eax, dword [0x42b9f4]
cmp eax, ebx
je 0x417c74
push eax
call fcn.0041166a
pop ecx
test eax, eax
je 0x417c74
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x417c74
mov eax, dword [0x42b9f8]
cmp eax, ebx
je 0x417c74
push eax
call fcn.0041166a
pop ecx
test eax, eax
je 0x417c74
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42b9f0]
call fcn.0041166a
pop ecx
test eax, eax
je 0x417c94
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x417c96
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401470
Capabilities:
Set socket configuration

Disassembly:
push ecx
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x24]
xor ebx, ebx
cmp eax, ebx
je 0x40154b
mov eax, dword [esi + 0x28]
push eax
mov dword [esi + 0x24], ebx
call sub.WSOCK32.dll_closesocket
push ebx
push 1
push 2
call sub.WSOCK32.dll_socket
push 4
lea ecx, [esp + 0xc]
push ecx
push 0x1001
push 0xffff
push eax
mov dword [esi + 0x28], eax
mov dword [esp + 0x1c], 0x80000
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x401527
mov eax, dword [esi + 0x28]
push 4
lea edx, [esp + 0xc]
push edx
push 0x1002
push 0xffff
push eax
mov dword [esp + 0x1c], 0x80000
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
je 0x401527
mov edx, dword [esi + 0x28]
lea ecx, [esp + 8]
push ecx
push 0x8004667e
push edx
mov dword [esp + 0x14], 1
call sub.WSOCK32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x401527
mov ecx, dword [esi + 0x28]
push 4
lea eax, [esp + 0xc]
push eax
push 1
push 6
push ecx
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
cmp eax, 0xffffffff
jne 0x40153f
push ebx
push 0x40d19e
push str.sockopt_error
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
pop esi
xor eax, eax
pop ebx
pop ecx
ret
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
pop esi
mov eax, 1
pop ebx
pop ecx
ret

Function at 0x401560
Capabilities:
Connect socket
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x18]
push esi
push edi
push eax
mov esi, ecx
call sub.WSOCK32.dll_gethostbyname
mov ecx, dword [esp + 0x24]
push ecx
mov edi, eax
mov word [esp + 0xc], 2
call sub.WSOCK32.dll_htons
mov word [esp + 0xa], ax
mov edx, dword [edi + 0xc]
mov eax, dword [edx]
mov eax, dword [eax]
mov edx, dword [esi + 8]
push 0x10
lea ecx, [esp + 0xc]
push ecx
push edx
mov dword [esi + 0x19054], eax
mov dword [esp + 0x18], eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
pop edi
pop esi
jne 0x4015c6
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x2733
neg eax
sbb eax, eax
inc eax
add esp, 0x10
ret 0xc
mov eax, 1
add esp, 0x10
ret 0xc

Function at 0x4015e0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x1c]
push esi
push eax
mov esi, ecx
mov word [esp + 8], 2
call sub.WSOCK32.dll_htons
mov ecx, dword [esp + 0x1c]
push ecx
mov word [esp + 0xa], ax
call sub.WSOCK32.dll_inet_addr
push 0x10
lea edx, [esp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x28]
push edx
push eax
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
pop esi
jne 0x401635
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x2733
neg eax
sbb eax, eax
inc eax
add esp, 0x10
ret 0xc
mov eax, 1
add esp, 0x10
ret 0xc

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

Disassembly:
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
push esi
push 0
mov esi, ecx
mov ecx, dword [esp + 0x10]
push eax
push ecx
push edx
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
mov dword [esi + 0x11905c], eax
jne 0x401680
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
mov dword [esi + 0x11905c], 0
je 0x401680
xor eax, eax
pop esi
ret 0xc
mov eax, 1
pop esi
ret 0xc
Function at 0x401690
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 4]
push esi
push 0
mov esi, ecx
mov ecx, dword [esp + 0x10]
push eax
push ecx
push edx
call sub.WSOCK32.dll_recv
test eax, eax
mov dword [esi + 0x119058], eax
je 0x4016ce
cmp eax, 0xffffffff
jne 0x4016d4
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
mov dword [esi + 0x119058], 0
je 0x4016d4
xor eax, eax
pop esi
ret 0xc
mov eax, 1
pop esi
ret 0xc

Function at 0x401890
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x18]
push esi
push eax
mov esi, ecx
mov word [esp + 8], 2
call sub.WSOCK32.dll_htons
mov ecx, dword [esp + 0x18]
push ecx
mov word [esp + 0xa], ax
call sub.WSOCK32.dll_inet_addr
push 0x10
lea edx, [esp + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x119068]
push edx
push eax
call sub.WSOCK32.dll_bind
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop esi
mov eax, ecx
add esp, 0x10
ret 8

Function at 0x401f60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x88
push ebx
mov ebx, dword [esp + 0x90]
push edi
lea edi, [ebx + ebx*4]
shl edi, 4
mov al, byte [edi + 0x4db57c]
test al, al
je 0x4020d0
cmp dword [edi + 0x4db580], 0xffffffff
je 0x4020d0
mov edx, dword [edi + 0x4db5b4]
push ebp
mov ebp, dword [esp + 0x9c]
movzx eax, word [ebp]
add eax, edx
cmp eax, 0x20000
push esi
jae 0x402032
call fcn.00404dd8
mov edx, dword [edi + 0x4db5b4]
mov ecx, dword [edi + 0x4db5ac]
add ecx, edx
mov dl, byte [ebp]
and al, 0xf
mov byte [ecx], dl
mov bl, al
shl bl, 4
or bl, byte [ebp + 1]
lea edx, [ebp + 1]
inc ecx
mov byte [ecx], bl
movzx ebx, word [ebp]
inc ecx
sub ebx, 2
inc edx
xor esi, esi
test ebx, ebx
jle 0x402015
movzx eax, al
shl eax, 2
lea ecx, [ecx]
mov ebx, esi
and ebx, 3
mov bl, byte [ebx + eax + 0x40f080]
xor bl, byte [edx]
xor bl, byte [0x40f048]
inc ecx
mov byte [ecx - 1], bl
movzx ebx, word [ebp]
inc edx
inc esi
sub ebx, 2
cmp esi, ebx
jl 0x401ff0
movzx eax, word [ebp]
mov ecx, dword [edi + 0x4db5b4]
pop esi
add ecx, eax
pop ebp
mov dword [edi + 0x4db5b4], ecx
pop edi
pop ebx
add esp, 0x88
ret
lea ecx, [edi + 0x4db598]
push ecx
lea edx, [esp + 0x1c]
push str._s_data_over
push edx
call fcn.00404d80
mov ecx, dword [0x40f7e0]
lea eax, [esp + 0x24]
push eax
push ecx
push 0x4db538
call fcn.004016e0
mov esi, dword [edi + 0x4db580]
add esp, 0x18
call fcn.00401ad0
mov edx, dword [edi + 0x4db580]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
xor eax, eax
mov dword [ebx*4 + 0x40f7e8], eax
mov dword [ebx*4 + 0x4da0e8], eax
mov dword [edi + 0x4db5b4], eax
mov dword [edi + 0x4db5bc], eax
lea eax, [esp + 0x10]
add ebx, 0x64
push eax
mov byte [edi + 0x4db57c], 0
mov dword [edi + 0x4db580], 0xffffffff
mov word [esp + 0x14], 8
mov word [esp + 0x16], 0x37
mov word [esp + 0x18], bx
mov word [esp + 0x1a], bx
call fcn.00401b10
add esp, 4
pop esi
pop ebp
pop edi
pop ebx
add esp, 0x88
ret
Function at 0x4020e0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x8c
push ebx
push ebp
mov ebp, dword [esp + 0x98]
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
mov edi, 0x4db5b4
lea esp, [esp]
cmp byte [edi - 0x38], 2
jne 0x40221e
cmp dword [edi - 0x34], 0xffffffff
je 0x40221e
movzx eax, word [ebp]
add eax, dword [edi]
cmp eax, 0x20000
jae 0x402198
call fcn.00404dd8
mov edx, dword [edi]
mov ecx, dword [edi - 8]
add ecx, edx
mov dl, byte [ebp]
and al, 0xf
mov byte [ecx], dl
mov bl, al
shl bl, 4
or bl, byte [ebp + 1]
lea edx, [ebp + 1]
inc ecx
mov byte [ecx], bl
movzx ebx, word [ebp]
inc ecx
sub ebx, 2
inc edx
xor esi, esi
test ebx, ebx
jle 0x402185
movzx eax, al
shl eax, 2
jmp 0x402160
mov ebx, esi
and ebx, 3
mov bl, byte [ebx + eax + 0x40f080]
xor bl, byte [edx]
xor bl, byte [0x40f048]
inc ecx
mov byte [ecx - 1], bl
movzx ebx, word [ebp]
inc edx
inc esi
sub ebx, 2
cmp esi, ebx
jl 0x402160
movzx eax, word [ebp]
mov ecx, dword [edi]
mov ebx, dword [esp + 0x10]
add ecx, eax
mov dword [edi], ecx
jmp 0x40221e
lea ecx, [edi - 0x1c]
push ecx
lea edx, [esp + 0x20]
push str._s_data_over
push edx
call fcn.00404d80
mov ecx, dword [0x40f7e0]
lea eax, [esp + 0x28]
push eax
push ecx
push 0x4db538
call fcn.004016e0
mov esi, dword [edi - 0x34]
add esp, 0x18
call fcn.00401ad0
mov edx, dword [edi - 0x34]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
xor eax, eax
mov dword [edi], eax
mov dword [edi + 8], eax
mov dword [ebx*4 + 0x40f7e8], eax
mov dword [ebx*4 + 0x4da0e8], eax
lea eax, [ebx + 0x64]
mov word [esp + 0x18], ax
mov word [esp + 0x1a], ax
lea eax, [esp + 0x14]
push eax
mov byte [edi - 0x38], 0
mov dword [edi - 0x34], 0xffffffff
mov word [esp + 0x18], 8
mov word [esp + 0x1a], 0x37
call fcn.00401b10
add esp, 4
inc ebx
add edi, 0x50
cmp edi, 0x4f45b4
mov dword [esp + 0x10], ebx
jl 0x402100
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret

Function at 0x402f60
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x38
push ebp
push 0x32
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_gethostname]
lea ecx, [esp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ebp, eax
test ebp, ebp
jne 0x402f94
push eax
push 0x40d19e
push str.error
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
test eax, eax
je 0x402fd3
push ebx
push esi
xor edx, edx
push edi
mov dword [esp + 0x10], eax
mov ecx, 4
mov esi, dword [esp + 0x10]
mov edi, 0x4f458c
mov ebx, ecx
shr ecx, 2
and ebx, 3
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xc]
mov eax, dword [edx + eax + 4]
add edx, 4
test eax, eax
jne 0x402fa2
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x38
ret