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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x14
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x64]
test eax, eax
je 0x46adc0
lea eax, [edi + 0x30f34]
mov dword [esp + 0x10], eax
mov ecx, dword [edi + 0x50]
mov eax, dword [edi + 0x2c]
lea ebx, [edi + 0x32c6c]
mov edx, 1
lea esi, [edi + 0x33074]
mov dword [esp + 8], ebx
xor ebx, ebx
shl edx, cl
sub eax, 1
test edx, edx
mov dword [edi + 0x378b8], eax
mov dword [edi + 0x33070], eax
je 0x46adae
mov ebp, dword [esp + 0x10]
mov dword [esp + 0xc], edx
mov ecx, eax
mov eax, dword [esp + 8]
mov dword [esp], esi
mov edx, ebx
mov dword [esp + 4], ebp
add esi, 0x440
call fcn.00464d50
mov ecx, dword [edi + 0x33070]
mov dword [edi + ebx*4 + 0x37474], ecx
add ebx, 1
cmp dword [esp + 0xc], ebx
jne 0x46ad20
mov ecx, dword [edi + 0x50]
mov eax, 1
shl eax, cl
test eax, eax
mov ebp, eax
je 0x46adae
lea eax, [edi + 0x374b4]
mov dword [esp + 0xc], ebp
mov ecx, dword [edi + 0x378b8]
mov ebp, dword [esp + 0x10]
lea esi, [edi + 0x378bc]
xor ebx, ebx
mov dword [esp + 8], eax
nop
mov eax, dword [esp + 8]
mov dword [esp], esi
mov edx, ebx
mov dword [esp + 4], ebp
add esi, 0x440
call fcn.00464d50
mov ecx, dword [edi + 0x378b8]
mov dword [edi + ebx*4 + 0x3bcbc], ecx
add ebx, 1
cmp dword [esp + 0xc], ebx
jne 0x46ad80
add esp, 0x14
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
xor ebp, ebp
call fcn.00464fd0
lea edx, [edi + 0x32c4c]
lea eax, [edi + 0x30f34]
mov dword [esp + 0x28], edi
mov dword [esp + 8], edx
movzx edx, word [edi + 0x32c4e]
mov ebx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
nop
mov eax, ebp
mov edx, dword [esp + 8]
mov esi, ebp
and eax, 1
shr esi, 1
mov ecx, eax
neg eax
and esi, 1
or ecx, 2
and eax, 0x7ff
xor eax, dword [esp + 0xc]
movzx edx, word [edx + ecx*2]
mov edi, esi
neg edi
and edi, 0x7ff
sar eax, 4
xor edx, edi
mov edi, dword [ebx + eax*4]
lea eax, [ecx + ecx]
sar edx, 4
or eax, esi
mov esi, dword [esp + 8]
add edi, dword [ebx + edx*4]
mov edx, ebp
shr edx, 2
and edx, 1
movzx ecx, word [esi + eax*2]
add eax, eax
mov esi, edx
or eax, edx
mov edx, ebp
neg esi
shr edx, 3
and esi, 0x7ff
neg edx
xor ecx, esi
mov esi, dword [esp + 8]
and edx, 0x7ff
sar ecx, 4
add edi, dword [ebx + ecx*4]
movzx eax, word [esi + eax*2]
xor eax, edx
sar eax, 4
add edi, dword [ebx + eax*4]
mov eax, dword [esp + 0x28]
mov dword [eax + ebp*4 + 0x325c8], edi
add ebp, 1
cmp ebp, 0x10
jne 0x46adf0
mov edi, eax
mov dword [eax + 0x84], 0
jmp 0x46ace0
Function at 0x4762f0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
mov ecx, dword [esp + 8]
xor edx, edx
mov dword [ecx + 0x34], 0
mov byte [ecx + 0x1f], 0
mov dword [ecx + 0x24], 0
mov dword [ecx + 0x30], 0x20
mov byte [ecx + 0x1d], 1
mov dword [ecx + 0x48], 4
mov byte [ecx + 0x1e], 0
nop
mov eax, edx
mov ebx, edx
and eax, 1
shr ebx, 1
neg eax
and eax, 0xedb88320
xor eax, ebx
mov ebx, eax
and eax, 1
neg eax
shr ebx, 1
and eax, 0xedb88320
xor eax, ebx
mov ebx, eax
and eax, 1
neg eax
shr ebx, 1
and eax, 0xedb88320
xor eax, ebx
mov ebx, eax
and eax, 1
neg eax
shr ebx, 1
and eax, 0xedb88320
xor ebx, eax
mov eax, ebx
and ebx, 1
neg ebx
shr eax, 1
and ebx, 0xedb88320
xor eax, ebx
mov ebx, eax
and eax, 1
neg eax
shr ebx, 1
and eax, 0xedb88320
xor ebx, eax
mov eax, ebx
and ebx, 1
shr eax, 1
neg ebx
and ebx, 0xedb88320
xor eax, ebx
mov ebx, eax
and eax, 1
neg eax
shr ebx, 1
and eax, 0xedb88320
xor eax, ebx
mov dword [ecx + edx*4 + 0x60], eax
add edx, 1
cmp edx, 0x100
jne 0x476320
pop ebx
ret

Function at 0x478ad0
Capabilities:
Create thread

Disassembly:
sub esp, 0x3c
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 8], eax
call dword [sym.imp.msvcrt.dll__beginthreadex]
mov edx, eax
mov eax, dword [esp + 0x40]
mov dword [eax], edx
xor eax, eax
test edx, edx
je 0x478b20
add esp, 0x3c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 1
test eax, eax
cmove eax, edx
add esp, 0x3c
ret
Function at 0x48a560
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push esi
push ebx
sub esp, 0x14
mov esi, dword [0x857a60]
mov ebx, dword [esp + 0x20]
mov eax, esi
cmp esi, dword [ebx + 8]
mov dword [ebx + 4], 0
ja 0x48a725
test eax, eax
mov dword [ebx + 4], esi
je 0x48a71f
mov ecx, dword [0x857a20]
mov edx, dword [ebx]
cmp eax, 1
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx], ebx
mov dword [edx + 4], esi
jbe 0x48a71f
mov ecx, dword [0x857a24]
cmp eax, 2
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 8], ebx
mov dword [edx + 0xc], esi
je 0x48a71f
mov ecx, dword [0x857a28]
cmp eax, 3
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x10], ebx
mov dword [edx + 0x14], esi
je 0x48a71f
mov ecx, dword [0x857a2c]
cmp eax, 4
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x18], ebx
mov dword [edx + 0x1c], esi
je 0x48a71f
mov ecx, dword [0x857a30]
cmp eax, 5
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x20], ebx
mov dword [edx + 0x24], esi
je 0x48a71f
mov ecx, dword [0x857a34]
cmp eax, 6
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x28], ebx
mov dword [edx + 0x2c], esi
je 0x48a71f
mov ecx, dword [0x857a38]
cmp eax, 7
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x30], ebx
mov dword [edx + 0x34], esi
je 0x48a71f
mov ecx, dword [0x857a3c]
cmp eax, 8
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x38], ebx
mov dword [edx + 0x3c], esi
je 0x48a71f
mov ecx, dword [0x857a40]
cmp eax, 9
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x40], ebx
mov dword [edx + 0x44], esi
je 0x48a71f
mov ecx, dword [0x857a44]
cmp eax, 0xa
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x48], ebx
mov dword [edx + 0x4c], esi
je 0x48a71f
mov ecx, dword [0x857a48]
cmp eax, 0xb
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x50], ebx
mov dword [edx + 0x54], esi
je 0x48a71f
mov ecx, dword [0x857a4c]
cmp eax, 0xc
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x58], ebx
mov dword [edx + 0x5c], esi
je 0x48a71f
mov ecx, dword [0x857a50]
cmp eax, 0xd
mov ebx, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [edx + 0x60], ebx
mov dword [edx + 0x64], esi
je 0x48a71f
mov ecx, dword [0x857a54]
cmp eax, 0xe
mov ebx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
mov dword [edx + 0x6c], ebx
mov dword [edx + 0x68], ecx
je 0x48a71f
mov ecx, dword [0x857a58]
cmp eax, 0xf
mov ebx, dword [ecx + 0xc]
mov ecx, dword [ecx + 8]
mov dword [edx + 0x74], ebx
mov dword [edx + 0x70], ecx
je 0x48a71f
mov eax, dword [0x857a5c]
mov ecx, dword [eax + 8]
mov ebx, dword [eax + 0xc]
mov dword [edx + 0x78], ecx
mov dword [edx + 0x7c], ebx
add esp, 0x14
pop ebx
pop esi
ret
mov eax, dword [ebx]
test eax, eax
je 0x48a733
mov dword [esp], eax
call fcn.006eb310
cmp esi, 0xfffffff
mov dword [ebx], 0
mov dword [ebx + 8], 0
ja 0x48a766
lea eax, [esi*8]
mov dword [esp], eax
call fcn.006eb360
mov dword [ebx + 8], esi
mov dword [ebx], eax
mov eax, dword [0x857a60]
jmp 0x48a581
call fcn.006ebc70
nop
lea esi, [esi]
Function at 0x4b4d80
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
sub esp, 8
test eax, eax
setne al
add esp, 0x1c
ret

Function at 0x4b4db0
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov edx, eax
and edx, 0x3fff
test eax, 0xf0000000
cmovne eax, edx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
sub esp, 8
test eax, eax
setne al
add esp, 0x1c
ret

Function at 0x4b4df0
Capabilities:
Delete directory

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
sub esp, 4
test eax, eax
setne al
add esp, 0x1c
ret

Function at 0x4b4e10
Capabilities:
Move file

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
sub esp, 8
test eax, eax
setne al
add esp, 0x1c
ret

Function at 0x4b4ea0
Capabilities:
Create directory

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
setne al
add esp, 0x1c
ret
Function at 0x4b4ed0
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call fcn.004b61d0
cmp eax, 0xffffffff
je 0x4b4ef1
test al, 0x10
jne 0x4b5080
mov dword [esp], ebx
call fcn.004b9510
test al, al
mov byte [ebp - 0x69], al
je 0x4b4f10
mov byte [ebp - 0x69], 0
movzx eax, byte [ebp - 0x69]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call fcn.004b9670
lea ecx, [ebp - 0x68]
mov dword [esp], ebx
mov dword [ebp - 0x70], eax
call fcn.00472800
lea ecx, [ebp - 0x68]
sub esp, 4
call fcn.00473340
test eax, eax
js 0x4b4f54
mov ecx, dword [ebp - 0x64]
lea edx, [ecx - 1]
cmp edx, eax
jne 0x4b4f54
cmp ecx, 1
je 0x4b50f0
mov eax, dword [ebp - 0x68]
xor ecx, ecx
mov dword [ebp - 0x64], edx
mov word [eax + edx*2], cx
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x5c]
mov dword [esp], eax
call fcn.00472920
mov ebx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x68]
sub esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
je 0x4b5010
cmp ebx, dword [ebp - 0x58]
jge 0x4b5100
mov eax, dword [ebp - 0x5c]
lea eax, [eax + ebx*2 + 2]
mov dword [esp], eax
call fcn.004b8cd0
lea ebx, [ebx + eax + 1]
test eax, eax
cmovs ebx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
lea ecx, [ebp - 0x68]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00472b20
mov eax, dword [ebp - 0x68]
sub esp, 8
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
sub esp, 8
test eax, eax
jne 0x4b4f8d
nop
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x4b4fef
mov dword [esp], eax
call fcn.006eb310
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x4b4f04
mov dword [esp], eax
call fcn.006eb310
movzx eax, byte [ebp - 0x69]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call edi
cmp eax, 0xb7
je 0x4b5090
call edi
cmp eax, 0xb7
je 0x4b4fe0
lea ecx, [ebp - 0x68]
call fcn.00473340
test eax, eax
mov ebx, eax
jle 0x4b4fe0
cmp eax, 1
je 0x4b5060
lea eax, [ebx + 1]
cmp dword [ebp - 0x70], eax
jae 0x4b4fe0
cmp ebx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x68]
jae 0x4b4f71
xor eax, eax
mov dword [ebp - 0x64], ebx
mov word [esi + ebx*2], ax
jmp 0x4b4f71
mov eax, dword [ebp - 0x68]
movzx eax, word [eax]
cmp ax, 0x5c
je 0x4b4fe0
cmp ax, 0x2f
jne 0x4b5035
jmp 0x4b4fe0
mov byte [ebp - 0x69], 1
movzx eax, byte [ebp - 0x69]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [ebp - 0x50]
call fcn.004b6180
lea ecx, [ebp - 0x28]
call fcn.00472730
lea ecx, [ebp - 0x50]
mov dword [esp], esi
call fcn.004b61f0
sub esp, 4
test al, al
jne 0x4b50d0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4b5019
mov dword [esp], eax
call fcn.006eb310
jmp 0x4b5019
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x30]
test eax, eax
je 0x4b50e2
mov dword [esp], eax
call fcn.006eb310
and esi, 0x10
je 0x4b5019
jmp 0x4b4f8d
mov byte [ebp - 0x69], 1
jmp 0x4b4fef
mov byte [ebp - 0x69], 1
jmp 0x4b4fe0
Function at 0x4b5150
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebx
sub esp, 0x18
mov ebx, dword [esp + 0x20]
mov dword [esp], ebx
call fcn.004b61d0
cmp eax, 0xffffffff
je 0x4b516f
mov edx, eax
and edx, 0x11
cmp edx, 1
je 0x4b5185
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
sub esp, 4
test eax, eax
setne al
add esp, 0x18
pop ebx
ret
and eax, 0xfffffffe
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
sub esp, 8
test eax, eax
jne 0x4b516f
jmp 0x4b5180
Function at 0x4b5620
Capabilities:
Get common file path

Disassembly:
push edi
push esi
xor edx, edx
push ebx
xor ecx, ecx
sub esp, 0x220
mov esi, dword [esp + 0x230]
lea edi, [esp + 0x14]
mov eax, dword [esi]
mov dword [esi + 4], 0
mov word [eax], dx
mov word [esp + 0x14], cx
mov dword [esp + 4], edi
mov dword [esp], 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
sub esp, 8
mov ebx, eax
mov ecx, esi
mov dword [esp], edi
sub ebx, 1
call fcn.004729e0
sub esp, 4
cmp ebx, 0x103
setbe al
add esp, 0x220
pop ebx
pop esi
pop edi
ret

Function at 0x4b61d0
Capabilities:
Get file attributes

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
sub esp, 4
add esp, 0x1c
ret
Function at 0x4b74a0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp - 0xc]
sub esp, 0x24
mov dword [esp + 4], eax
mov eax, dword [ecx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
mov ebx, eax
je 0x4b74f0
mov eax, dword [ebp - 0xc]
mov ecx, ebx
xor ebx, ebx
mov edx, eax
xor eax, eax
add eax, ecx
mov ecx, dword [ebp + 8]
adc edx, ebx
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov eax, 1
mov ebx, dword [ebp - 4]
leave
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4b74c3
xor eax, eax
jmp 0x4b74df

Function at 0x4b7920
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0xc]
mov dword [esp + 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [esp + 0xc], edx
mov edx, 0x400000
cmp eax, 0x400000
cmova eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ecx]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 0x10]
sub esp, 0x14
test eax, eax
setne al
mov dword [edx], ecx
leave
ret 0xc

Function at 0x4b7990
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x2c], ecx
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [edi], 0
jmp 0x4b79ba
test edx, edx
je 0x4b7a10
add esi, edx
sub ebx, edx
je 0x4b7a10
lea eax, [ebp - 0x1c]
cmp ebx, 0x400000
mov dword [esp + 0x10], 0
mov dword [esp + 4], esi
mov dword [ebp - 0x1c], 0
mov dword [esp + 0xc], eax
mov eax, 0x400000
cmovbe eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
mov edx, dword [ebp - 0x1c]
add dword [edi], edx
test eax, eax
jne 0x4b79b0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret 0xc

Function at 0x4b7da0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x2c], ecx
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [edi], 0
jmp 0x4b7dca
test edx, edx
je 0x4b7e20
add esi, edx
sub ebx, edx
je 0x4b7e20
lea eax, [ebp - 0x1c]
cmp ebx, 0x400000
mov dword [esp + 0x10], 0
mov dword [esp + 4], esi
mov dword [ebp - 0x1c], 0
mov dword [esp + 0xc], eax
mov eax, 0x400000
cmovbe eax, ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
mov edx, dword [ebp - 0x1c]
add dword [edi], edx
test eax, eax
jne 0x4b7dc0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
Function at 0x4b8940
Capabilities:
Get common file path

Disassembly:
push edi
push esi
mov esi, eax
push ebx
xor edx, edx
xor ecx, ecx
sub esp, 0x220
mov eax, dword [eax]
mov dword [esi + 4], 0
lea edi, [esp + 0x14]
mov word [eax], dx
mov word [esp + 0x14], cx
mov dword [esp + 4], edi
mov dword [esp], 0x105
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
sub esp, 8
mov ebx, eax
mov ecx, esi
mov dword [esp], edi
sub ebx, 1
call fcn.004729e0
sub esp, 4
cmp ebx, 0x103
setbe al
add esp, 0x220
pop ebx
pop esi
pop edi
ret

Function at 0x4bb030
Capabilities:
Get system information on windows

Disassembly:
push ebx
sub esp, 0x48
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edx, [esp + 0x14]
lea ecx, [esp + 0x18]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetProcessAffinityMask]
sub esp, 0xc
test eax, eax
je 0x4bb090
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x4bb090
xor eax, eax
xor ecx, ecx
lea esi, [esi]
lea edi, [edi]
mov edx, ebx
shr edx, cl
add ecx, 1
and edx, 1
add eax, edx
cmp ecx, 0x20
jne 0x4bb070
add esp, 0x48
pop ebx
ret
lea eax, [esp + 0x1c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
sub esp, 4
mov eax, dword [esp + 0x30]
add esp, 0x48
pop ebx
ret
Function at 0x5029a5
Capabilities:
Set socket configuration

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [esp + 0x5c]
mov edi, dword [esp + 0x50]
call fcn.00614c34
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp], edi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
sub esp, 0x18
mov ebx, eax
call fcn.004dccc9
mov ebp, eax
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
cmp ebx, 0xffffffff
mov dword [esi], eax
mov dword [esi + 4], ebp
je 0x502a53
cmp edi, 0x17
lea edi, [esp + 0x28]
jne 0x502a3f
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 0x29
mov dword [esp], ebx
call dword [sym.imp.WSOCK32.DLL_setsockopt]
sub esp, 0x14
mov ecx, edi
call fcn.0062d0ac
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esi], eax
mov dword [esi + 4], edx
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x503db8
Capabilities:
Terminate thread

Disassembly:
push ebx
mov ebx, ecx
sub esp, 0x28
mov eax, dword [ecx + 4]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], 0
mov dword [esp], 2
mov dword [esp + 0x18], eax
mov eax, dword [ecx]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov eax, dword [ebx + 4]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
xor eax, eax
lock xadd dword [0x718d50], eax
test eax, eax
mov eax, dword [ebx]
je 0x503e23
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x503e52
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0x501bac
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
mov eax, dword [ebx]
sub esp, 0xc
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push eax
push eax
add esp, 0x28
pop ebx
ret

Function at 0x503e5a
Capabilities:
Initialize winsock library

Disassembly:
push ebx
shl ecx, 8
movzx edx, dl
or edx, ecx
mov ebx, eax
sub esp, 0x1a8
movzx edx, dx
lea eax, [esp + 0x10]
mov dword [esp], edx
mov dword [esp + 4], eax
call dword [sym.imp.WSOCK32.DLL_WSAStartup]
push edx
push edx
xchg dword [ebx + 4], eax
add esp, 0x1a8
pop ebx
ret
push ebx
mov eax, dword [esp + 8]
mov ebx, 1
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
lock xadd dword [eax], ebx
test ebx, ebx
jne 0x503e80
pop ebx
movzx ecx, cl
movzx edx, dl
jmp 0x501cb2
pop ebx
ret
Function at 0x505d47
Capabilities:
Send data
Send data on socket

Disassembly:
push esi
push ebx
sub esp, 0x44
mov ebx, dword [esp + 0x68]
call fcn.00614c34
mov eax, dword [esp + 0x64]
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_WSASendTo]
sub esp, 0x24
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00614c10
mov esi, eax
mov eax, dword [ebx]
cmp eax, 0x40
jne 0x505dcf
call fcn.004dccc9
mov dword [ebx], 0x2746
jmp 0x505de1
cmp eax, 0x4d2
jne 0x505de4
call fcn.004dccc9
mov dword [ebx], 0x274d
mov dword [ebx + 4], eax
or eax, 0xffffffff
test esi, esi
jne 0x505e05
lea ecx, [esp + 0x38]
call fcn.0062d0ac
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [ebx], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 4], edx
add esp, 0x44
pop ebx
pop esi
ret

Function at 0x505e0b
Capabilities:
Set socket configuration

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebp, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov esi, dword [esp + 0x60]
cmp ebp, 0xffffffff
jne 0x505e3a
call fcn.004dccc9
mov dword [esi], 0x2719
mov dword [esi + 4], eax
or eax, 0xffffffff
jmp 0x505e9c
call fcn.00614c34
mov eax, dword [esp + 0x58]
mov dword [esp + 8], edi
mov dword [esp], ebp
mov dword [esp + 4], eax
call dword [sym.imp.WSOCK32.DLL_ioctlsocket]
sub esp, 0xc
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00614c10
test eax, eax
js 0x505e9c
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], eax
call fcn.0062d0ac
cmp dword [esp + 0x58], 0x8004667e
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esi], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 4], edx
jne 0x505e9c
cmp dword [edi], 0
je 0x505e99
or byte [ebx], 1
jmp 0x505e9c
and byte [ebx], 0xfc
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x50641e
Capabilities:
Get socket status

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x14c
mov edi, dword [esp + 0x160]
mov ebx, dword [esp + 0x164]
mov esi, dword [esp + 0x168]
cmp edi, 0xffffffff
jne 0x50644f
call fcn.004dccc9
mov dword [esi], 0x2719
jmp 0x5064ca
lea ebp, [esp + 0x2c]
and bl, 1
mov eax, 0
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], 1
cmove ebp, eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
call fcn.00614c34
lea eax, [esp + 0x3c]
inc edi
mov dword [esp + 0x10], ebp
mov dword [esp], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
call dword [sym.imp.WSOCK32.DLL_select]
sub esp, 0x14
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00614c10
cmp eax, 0
mov edi, eax
jne 0x5064cf
test bl, bl
je 0x5064d1
call fcn.004dccc9
mov dword [esi], 0x2733
mov dword [esi + 4], eax
jmp 0x5064e7
jle 0x5064e7
lea ecx, [esp + 0x34]
call fcn.0062d0ac
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [esi], eax
mov dword [esi + 4], edx
add esp, 0x14c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x506f0a
Capabilities:
Connect socket

Disassembly:
push esi
push ebx
sub esp, 0x34
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x4c]
cmp esi, 0xffffffff
jne 0x506f2f
call fcn.004dccc9
mov dword [ebx], 0x2719
mov dword [ebx + 4], eax
or eax, 0xffffffff
jmp 0x506f7e
call fcn.00614c34
mov eax, dword [esp + 0x48]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
call dword [sym.imp.WSOCK32.DLL_connect]
sub esp, 0xc
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.00614c10
test eax, eax
jne 0x506f7e
lea ecx, [esp + 0x28]
mov dword [esp + 0x1c], eax
call fcn.0062d0ac
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
mov dword [ebx + 4], edx
add esp, 0x34
pop ebx
pop esi
ret