joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1013b910
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x290
mov eax, dword [0x101d90a8]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x84]
push edi
push 0x80
push 0
push eax
call fcn.1015bd90
push 0x80
lea eax, [ebp - 0x84]
push eax
push esi
call fcn.1013add0
lea ecx, [ebp - 0x188]
mov edi, esi
mov eax, ecx
add esp, 0x18
mov edx, 0x104
sub edi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1013b97a
mov al, byte [edi + ecx]
test al, al
je 0x1013b97a
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x1013b961
lea eax, [ecx - 1]
test edx, edx
cmovne eax, ecx
mov ecx, 0x104
mov byte [eax], 0
lea eax, [ebp - 0x188]
cmp byte [eax], 0
je 0x1013b99b
inc eax
sub ecx, 1
jne 0x1013b990
mov edx, 0x104
mov edi, ecx
mov eax, edx
sub eax, ecx
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x1013b9f0
lea ecx, [ebp - 0x188]
lea ecx, [ecx + edi]
sub edx, edi
je 0x1013b9e5
lea edi, [ebp - 0x84]
mov eax, SysReAllocString
sub edi, ecx
push ebx
nop dword [eax + eax]
test eax, eax
je 0x1013b9e4
mov bl, byte [edi + ecx]
test bl, bl
je 0x1013b9e4
mov byte [ecx], bl
dec eax
inc ecx
sub edx, 1
jne 0x1013b9d0
pop ebx
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
push 0x100
lea eax, [ebp - 0x288]
mov dword [ebp - 0x290], 1
push 0
push eax
call fcn.1015bd90
add esp, 0xc
mov dword [ebp - 0x28c], 0x100
lea eax, [ebp - 0x28c]
push eax
lea eax, [ebp - 0x288]
push eax
lea eax, [ebp - 0x290]
push eax
push 0x101ade14
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
mov edi, dword [sym.imp.SHLWAPI.dll_SHSetValueA]
test eax, eax
jne 0x1013baaa
lea eax, [ebp - 0x288]
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x1013ba74
test cl, cl
je 0x1013ba70
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x1013ba74
add eax, 2
add esi, 2
test cl, cl
jne 0x1013ba54
xor eax, eax
jmp 0x1013ba79
sbb eax, eax
or eax, 1
test eax, eax
je 0x1013baaa
lea ecx, [ebp - 0x288]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1013ba86
sub ecx, edx
lea eax, [ebp - 0x288]
push ecx
push eax
push 1
push str.mid_old
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call edi
lea ecx, [ebp - 0x188]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1013bab3
sub ecx, edx
lea eax, [ebp - 0x188]
push ecx
push eax
push 1
push 0x101ade14
push str.SoftwareComMaster
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1013724c
mov esp, ebp
pop ebp
ret
Function at 0x1013d8b0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0
push dword [ebp + 8]
call fcn.1013d9e0
add esp, 8
test al, al
je 0x1013d8d5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x1013d8d5
mov al, 1
pop ebp
ret
xor al, al
pop ebp
ret

Function at 0x1013d9e0
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
setne al
pop ebp
ret

Function at 0x1013dd60
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
push eax
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1013dd8b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1013dd8b
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [ebp - 4]
add ecx, esi
pop esi
adc edx, 0
mov dword [eax], ecx
mov dword [eax + 4], edx
mov al, 1
mov esp, ebp
pop ebp
ret 4

Function at 0x1013ec8c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret

Function at 0x10154d30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
xor al, al
push edi
xor edi, edi
test esi, esi
je 0x10154df7
push ebx
mov ecx, dword [ebp + 8]
mov dl, byte [edi + ecx]
xor dl, al
mov cl, dl
shr cl, 1
mov al, cl
xor al, 0x8c
and dl, 1
movzx ebx, al
movzx eax, cl
cmove ebx, eax
mov cl, bl
shr cl, 1
mov al, cl
xor al, 0x8c
and bl, 1
movzx edx, al
movzx eax, cl
cmove edx, eax
mov cl, dl
shr cl, 1
mov al, cl
xor al, 0x8c
and dl, 1
movzx ebx, al
movzx eax, cl
cmove ebx, eax
mov cl, bl
shr cl, 1
mov al, cl
xor al, 0x8c
and bl, 1
movzx edx, al
movzx eax, cl
cmove edx, eax
mov cl, dl
shr cl, 1
mov al, cl
xor al, 0x8c
and dl, 1
movzx ebx, al
movzx eax, cl
cmove ebx, eax
mov cl, bl
shr cl, 1
mov al, cl
xor al, 0x8c
and bl, 1
movzx edx, al
movzx eax, cl
cmove edx, eax
mov cl, dl
shr cl, 1
mov al, cl
xor al, 0x8c
and dl, 1
movzx ebx, al
movzx eax, cl
cmove ebx, eax
mov cl, bl
shr cl, 1
mov al, cl
movzx ecx, cl
xor al, 0x8c
and bl, 1
movzx eax, al
cmove eax, ecx
inc edi
cmp edi, esi
jb 0x10154d45
pop ebx
pop edi
pop esi
pop ebp
ret
Function at 0x10156530
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10190fc3
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x101d90a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x8c], 0
mov dword [ebx], 0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
push 0x201
push dword [0x101da218]
lea ecx, [ebp - 0x8c]
mov dword [ebp - 4], 0
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10156420
mov edi, dword [ebp - 0x8c]
test eax, eax
jne 0x10156711
push 0x64
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.1015bd90
add esp, 0xc
mov dword [ebp - 0x78], 0x64
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x74]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
push 0x101b0290
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10156711
mov eax, dword [ebp - 0x7c]
cmp eax, 1
je 0x10156605
cmp eax, 2
jne 0x10156711
mov ecx, dword [ebp - 0x78]
test ecx, ecx
je 0x10156626
test cl, 1
jne 0x10156711
mov eax, ecx
shr eax, 1
cmp word [ebp + eax*2 - 0x76], 0
je 0x1015662c
jmp 0x10156711
xor eax, eax
mov word [ebp - 0x74], ax
shr ecx, 1
cmp ecx, 0x2d
jne 0x10156711
call fcn.10003400
mov ecx, eax
test ecx, ecx
je 0x1015673c
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x78]
call fcn.101547a0
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x7c], 0
push eax
lea eax, [ebp - 0x20]
push 0x101b0298
push eax
call fcn.10059500
mov esi, dword [ebp - 0x78]
push 0x2a
push esi
call fcn.10154d30
movzx eax, al
add esp, 0x14
cmp dword [ebp - 0x7c], eax
jne 0x101566f5
lea edx, [ebp - 0x74]
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10156696
sub edx, ecx
lea eax, [ebp - 0x74]
mov ecx, dword [ebp - 0x80]
sar edx, 1
push edx
push eax
call fcn.10156750
push dword [0x101da220]
lea eax, [ebp - 0x74]
push dword [0x101da21c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x101566d2
mov dword [ebx], 1
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x101566ee
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, 1
jmp 0x10156713
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10156711
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
test edi, edi
je 0x1015671e
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1013724c
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10003040
int3
Function at 0x10156830
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10190ff8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x101d90a8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
push 0x202
push dword [0x101da218]
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.10156420
test eax, eax
je 0x10156958
mov esi, dword [ebp - 0x18]
mov edi, dword [0x101da218]
mov dword [ebp - 0x10], 0
test esi, esi
je 0x10156903
cmp dword [esi], 0
je 0x101568f6
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x101568c3
mov eax, 1
jmp 0x10156924
push str.RegCreateKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x101568fc
push 0
push dword [esi]
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0x20206
push 0
push 0
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call eax
jmp 0x10156924
cmp dword [esi + 4], 0
jne 0x10156903
mov eax, 1
jmp 0x10156924
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0x20206
push 0
push 0
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x1015694e
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x10156936
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], 0x200
test eax, eax
je 0x1015695b
xor ebx, ebx
jmp 0x101569ff
mov esi, dword [ebp - 0x20]
xor ebx, ebx
jmp 0x101569ff
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x101569b8
mov ecx, dword [ebx]
test ecx, ecx
je 0x10156a1e
push ecx
push eax
call fcn.10161ffa
add esp, 8
test eax, eax
je 0x101569b8
mov edx, dword [edi]
test edx, edx
je 0x101569b8
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10156990
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.m2_old
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebx]
test edx, edx
jne 0x101569c3
lea eax, [edx + 0xd]
jmp 0x101569f8
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x101569d0
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push 0x101b0290
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ebx, ebx
test eax, eax
sete bl
test esi, esi
je 0x10156a0a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10003040
int3
Function at 0x10158080
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], 0
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x101580f1
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x101580bf
cmp eax, 2
jne 0x101580db
mov ecx, dword [ebp + 0x10]
test esi, esi
je 0x101580eb
test ecx, ecx
je 0x101580e6
test cl, 1
jne 0x101580db
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x101580eb
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x10159b60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101912bb
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
push ebx
push esi
push edi
mov eax, dword [0x101d90a8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 8]
lea esi, [ebx + 0x14]
push 0x20000
push 0
push esi
call fcn.1015bd90
add esp, 0xc
lea eax, [ebx + 0x20014]
push 0
push eax
push 0x20000
push esi
push dword [ebx + 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10159d2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x10], esi
test eax, eax
je 0x10159ce7
cmp eax, 0xffffffff
je 0x10159ce7
call fcn.1006bca0
mov ecx, eax
push 1
mov edx, dword [eax]
mov eax, dword [edx + 8]
call eax
movzx eax, al
sub eax, 1
jne 0x10159ce7
cmp dword [ebx + 0x2005c], 8
lea eax, [ebx + 0x20048]
mov dword [ebp - 0x14], eax
jb 0x10159c15
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
push 0x61
push str.d:jenkins.jenkinsworkspacelib_commonlds_rpclds_rpc_src_rpc_instance_rpc_client_instance.cpp
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0xf
mov byte [ebp - 0x44], 0
call fcn.1001f970
push 3
push 0x10193314
lea ecx, [ebp - 0x2c]
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
call fcn.1001f970
mov byte [ebp - 4], 1
call fcn.1006bca0
mov edi, eax
lea ecx, [ebp - 0xdc]
push 0x95
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.100119f0
mov esi, eax
push str.RecvData_failed__error_code_:
push esi
mov byte [ebp - 4], 2
call fcn.100146d0
add esp, 8
mov ecx, esi
push dword [ebp - 0x10]
call fcn.100141c0
push str.__channel_name:
push esi
call fcn.100146d0
mov ecx, dword [ebp - 0x14]
mov eax, 0x101933c8
test ecx, ecx
cmovne eax, ecx
push eax
push esi
call fcn.1000d8e0
mov eax, dword [edi]
add esp, 0x10
mov ecx, edi
push esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0xdc]
call fcn.10014b90
lea ecx, [ebp - 0x2c]
call fcn.10005450
lea ecx, [ebp - 0x44]
call fcn.10005450
mov esi, dword [ebp - 0x10]
mov dword [ebx + 0xc], 6
cmp esi, 0xe8
je 0x10159d08
cmp esi, 0xe9
je 0x10159d08
cmp esi, 0x6d
je 0x10159d08
cmp esi, 6
jne 0x10159d5e
mov dword [ebx + 0xc], 7
mov dword [ebx + 0x10], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 4]
lea ecx, [edi + 4]
mov dword [ecx + 4], eax
mov dword [edi + 0x10], 0
mov eax, dword [ebx + 0x20014]
test eax, eax
je 0x10159d57
test esi, esi
je 0x10159d57
push dword [ebp - 0x10]
add eax, esi
push eax
push esi
push dword [ecx + 4]
call fcn.10072240
mov dword [edi + 0x10], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x10177a68
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.101778e7

Function at 0x1017dad4
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.1017d794
Function at 0x401708
Capabilities:
Send data
Send data on socket
Send http request

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffe000
push ebx
push esi
push edi
mov esi, 0
push esi
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call fcn.004014c8
add esp, 8
push eax
push dword [ebp + 0x10]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov esi, 0x414078
push esi
call fcn.00401016
add esp, 0x18
mov esi, 0
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
cmp dword [0x416014], 0
jne 0x40175e
jmp 0x401768
mov esi, 0x414093
jmp 0x40176d
mov esi, 0x41409c
push esi
push dword [ebp + 0xc]
mov esi, 0x416018
push esi
lea esi, [ebp - 0x2000]
push esi
call fcn.00408078
add esp, 0x1c
mov esi, 0
push esi
lea esi, [ebp - 0x2000]
push esi
mov esi, 0x4140a2
push esi
call fcn.00401016
add esp, 0xc
mov esi, 0
push esi
lea esi, [ebp - 0x2000]
push esi
call fcn.00408480
add esp, 4
push eax
lea esi, [ebp - 0x2000]
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_send
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
cmp dword [ebp + 8], 0
je 0x40187e
jmp 0x4018e8
mov esi, 0x10
and esi, dword [0x41003c]
cmp esi, 0
jne 0x401897
jmp 0x4018a6
mov eax, 1
jmp 0x4019b5
mov esi, 0x410030
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00408269
add esp, 0xc
mov esi, 0xffffffff
add esi, dword [ebp + 0x10]
mov eax, esi
mov esi, 1
imul esi
add eax, dword [ebp + 0xc]
mov ebx, eax
mov byte [ebx], 0
push dword [ebp + 0xc]
call fcn.00408480
add esp, 4
jmp 0x4019b5
mov esi, 0
push esi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call sub.WSOCK32.dll_recv
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
mov esi, 1
jl 0x401913
mov esi, 0
cmp esi, 0
je 0x401921
jmp 0x40196b
mov esi, 0
push esi
push dword [ebp + 0x10]
push dword [ebp - 4]
push dword [ebp + 8]
mov esi, 0x4140c6
push esi
call fcn.00401016
add esp, 0x14
mov eax, dword [ebp - 4]
mov esi, 1
imul esi
add eax, dword [ebp + 0xc]
mov ebx, eax
mov byte [ebx], 0
push dword [ebp - 4]
push dword [ebp + 0xc]
call fcn.004014c8
add esp, 8
mov eax, dword [ebp - 4]
jmp 0x4019b5
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2733
je 0x401985
jmp 0x401994
mov eax, 0
jmp 0x4019b5
mov esi, 0
push esi
push dword [ebp - 8]
mov esi, 0x4140f1
push esi
call fcn.00401016
add esp, 0xc
mov eax, 0
jmp 0x4019b5
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402124
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, 0
push esi
push dword [0x417484]
push dword [0x417480]
mov esi, 0x414138
push esi
call fcn.00401016
add esp, 0x10
mov esi, dword [0x417480]
add esi, dword [0x417484]
cmp esi, 0
je 0x40216a
jmp 0x402227
cmp dword [ebp + 0x18], 0
mov esi, 1
je 0x40217e
mov esi, 0
cmp esi, 0
je 0x40218c
jmp 0x4021d9
mov esi, 4
add esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebx]
add edi, dword [esi]
cmp edi, 0
mov esi, 1
jg 0x4021ae
mov esi, 0
cmp esi, 0
mov esi, 1
je 0x4021c1
mov esi, 0
cmp esi, 0
je 0x4021cf
jmp 0x4021d9
mov esi, 0
jmp 0x4021de
mov esi, 1
cmp esi, 0
jne 0x4021ec
jmp 0x4021fb
mov eax, 0
jmp 0x40242e
mov esi, 4
add esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x18]
mov eax, dword [ebx]
mov edi, 0x3e8
imul edi
add eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, 0
jmp 0x40242e
push dword [ebp + 0x18]
mov esi, dword [0x417480]
add esi, dword [0x417484]
cmp esi, 0
jg 0x402244
jmp 0x40224c
mov esi, dword [ebp + 0x14]
jmp 0x402251
mov esi, 0
push esi
cmp dword [0x417484], 0
jg 0x402264
jmp 0x40226c
mov esi, dword [ebp + 0x10]
jmp 0x402271
mov esi, 0
push esi
cmp dword [0x417480], 0
jg 0x402284
jmp 0x40228c
mov esi, dword [ebp + 0xc]
jmp 0x402291
mov esi, 0
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_select
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
mov esi, 1
jl 0x4022b1
mov esi, 0
cmp esi, 0
je 0x4022bf
jmp 0x4022cc
mov eax, dword [ebp - 4]
jmp 0x40242e
push dword [ebp + 0x18]
mov esi, 0
push esi
mov esi, 0
push esi
cmp dword [0x417480], 0
jg 0x4022ed
jmp 0x4022f5
mov esi, dword [ebp + 0xc]
jmp 0x4022fa
mov esi, 0
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_select
mov dword [ebp - 4], eax
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
jl 0x40231d
jmp 0x40233c
mov esi, 0
push esi
push dword [ebp - 8]
push dword [ebp - 4]
mov esi, 0x41414e
push esi
call fcn.00401016
add esp, 0x10
jmp 0x40233c
push dword [ebp + 0x18]
mov esi, 0
push esi
cmp dword [0x417484], 0
jg 0x402357
jmp 0x40235f
mov esi, dword [ebp + 0x10]
jmp 0x402364
mov esi, 0
push esi
mov esi, 0
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_select
mov dword [ebp - 4], eax
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
jl 0x40238d
jmp 0x4023ac
mov esi, 0
push esi
push dword [ebp - 8]
push dword [ebp - 4]
mov esi, 0x41416b
push esi
call fcn.00401016
add esp, 0x10
jmp 0x4023ac
push dword [ebp + 0x18]
mov esi, dword [0x417480]
add esi, dword [0x417484]
cmp esi, 0
jg 0x4023c9
jmp 0x4023d1
mov esi, dword [ebp + 0x14]
jmp 0x4023d6
mov esi, 0
push esi
mov esi, 0
push esi
mov esi, 0
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_select
mov dword [ebp - 4], eax
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 8], eax
cmp dword [ebp - 4], 0
jl 0x402405
jmp 0x402424
mov esi, 0
push esi
push dword [ebp - 8]
push dword [ebp - 4]
mov esi, 0x414188
push esi
call fcn.00401016
add esp, 0x10
jmp 0x402424
mov eax, 0xffffffff
jmp 0x40242e
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402656
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffffc
push ebx
push esi
push edi
mov esi, 0
push esi
mov esi, 0x4141da
push esi
call fcn.00401016
add esp, 8
mov esi, 0
push esi
mov esi, 1
push esi
mov esi, 2
push esi
call sub.WSOCK32.dll_socket
mov dword [ebp - 4], eax
push dword [ebp - 4]
call fcn.004019fc
add esp, 4
cmp dword [ebp + 8], 0
je 0x4026aa
jmp 0x4026c6
mov esi, 0x4141e4
push esi
mov esi, 0
push esi
push dword [ebp - 4]
call fcn.00401456
add esp, 0xc
jmp 0x4026e0
mov esi, 0x4141e5
push esi
mov esi, 0
push esi
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret

Function at 0x402b06
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov esi, 0
push esi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
mov esi, 0x41423a
push esi
call fcn.00401016
add esp, 0x14
push dword [ebp + 0x10]
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x20], eax
mov word [ebp - 0x10], 2
mov esi, 0xa
add esi, dword [ebp - 0x20]
mov ax, word [esi]
cwde
push eax
mov esi, 0xc
add esi, dword [ebp - 0x20]
mov edi, dword [esi]
push dword [edi]
lea esi, [ebp - 0xc]
push esi
call fcn.00408ba0
add esp, 0xc
push dword [ebp + 0x14]
call fcn.004010e9
add esp, 4
push eax
call sub.WSOCK32.dll_htons
movzx ebx, ax
mov word [ebp - 0xe], bx
mov dword [ebp - 0x14], 0x10
push dword [ebp - 0x14]
lea esi, [ebp - 0x10]
push esi
push dword [ebp + 0xc]
call fcn.004010e9
add esp, 4
push eax
call sub.WSOCK32.dll_connect
mov dword [ebp - 0x18], eax
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], 0
mov esi, 1
jl 0x402bc1
mov esi, 0
cmp esi, 0
jne 0x402bcf
jmp 0x402bfe
cmp dword [ebp - 0x1c], 0x2733
mov esi, 1
je 0x402be6
mov esi, 0
cmp esi, 0
jne 0x402bf4
jmp 0x402bfe
mov esi, 1
jmp 0x402c03
mov esi, 0
cmp esi, 0
jne 0x402c11
jmp 0x402c1d
mov dword [ebp - 0x18], 0
jmp 0x402c1d
cmp dword [ebp - 0x18], 0
jl 0x402c2c
jmp 0x402c48
mov esi, 0
push esi
push dword [ebp - 0x1c]
mov esi, 0x41424d
push esi
call fcn.00401016
add esp, 0xc
jmp 0x402c48
cmp dword [ebp - 0x18], 0
mov esi, 1
jl 0x402c5c
mov esi, 0
cmp esi, 0
je 0x402c6a
jmp 0x402c83
push dword [ebp + 0xc]
call fcn.004010e9
add esp, 4
push eax
call fcn.00401bf7
add esp, 4
jmp 0x402c83
cmp dword [ebp + 8], 0
je 0x402c92
jmp 0x402cae
mov esi, 0x414264
push esi
mov esi, 0
push esi
push dword [ebp - 0x18]
call fcn.00401456
add esp, 0xc
jmp 0x402cc8
mov esi, 0x414265
push esi
mov esi, 0
push esi
push dword [ebp - 0x18]
push dword [ebp + 8]
call fcn.004017cb
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret