joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10047660
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x10017428
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x10047687
add eax, 8
inc ecx
cmp eax, 0x100174b8
jb 0x10047678
cmp dword [ecx*8 + 0x10017428], edx
lea ebx, [ecx*8]
jne 0x1004784b
cmp dword [0x1001674c], 1
je 0x10047807
cmp dword [0x1001674c], 0
jne 0x100476be
cmp dword [0x10016750], 1
je 0x10047807
cmp edx, 0xfc
je 0x1004784b
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x100476fb
mov esi, 0x1000e368
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x1004773f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x1000e364
push ebp
call fcn.10045150
add esp, 0xc
mov esi, 0x1000e348
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x10016318
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x1001742c]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push 0x1000e320
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.10049280
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
cmp dword [0x1003e0a0], 0
je 0x1004781d
mov eax, dword [0x1003e0a0]
mov esi, dword [eax + 0x48]
cmp esi, 0xffffffff
jne 0x10047827
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x1001742c]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x10047920
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x418
push ebx
push esi
push edi
push ebp
xor edi, edi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], edi
cmp ebp, edi
jne 0x10047948
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov edx, dword [esp + 0x42c]
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x1003e0a0
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ebx, dword [esp + 0x18]
shl eax, 2
lea ecx, [eax + eax*8]
mov eax, dword [ebx]
mov dword [esp + 0x1c], ecx
test byte [eax + ecx + 4], 0x20
je 0x10047989
push 2
push 0
push edx
call fcn.10047ba0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x10047a25
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x10047a5e
lea esi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x100479ec
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x100479da
mov byte [esi], 0xd
inc edi
inc esi
mov byte [esi], al
inc esi
mov eax, esi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x100479c1
lea eax, [esp + 0x24]
push 0
sub esi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push esi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047a54
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp eax, esi
jge 0x100479ac
jmp 0x10047a5e
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10047a54
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x10047a5e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x10047b0a
cmp dword [esp + 0x10], 0
je 0x10047aba
cmp dword [esp + 0x10], 5
jne 0x10047a9d
call fcn.100481d0
mov dword [eax], 9
call fcn.100481e0
mov ecx, dword [esp + 0x10]
pop ebp
pop edi
mov dword [eax], ecx
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10048150
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x10047ae4
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x10047ae4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
call fcn.100481d0
mov dword [eax], 0x1c
call fcn.100481e0
pop ebp
mov dword [eax], 0
mov eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, edi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x10049c10
Capabilities:
Clear file content

Disassembly:
mov eax, 0x1008
call fcn.1004b780
push ebx
push esi
push edi
xor ebx, ebx
mov esi, dword [esp + 0x1018]
push ebp
push 1
push ebx
push esi
call fcn.10047ba0
mov dword [esp + 0x1c], eax
add esp, 0xc
cmp eax, 0xffffffff
je 0x10049d32
push 2
push ebx
push esi
call fcn.10047ba0
add esp, 0xc
cmp eax, 0xffffffff
je 0x10049d32
mov ecx, dword [esp + 0x1020]
mov ebp, ecx
sub ebp, eax
test ebp, ebp
jle 0x10049cd3
lea edi, [esp + 0x18]
xor eax, eax
mov ecx, 0x400
push 0x8000
rep stosd dword es:[edi], eax
push esi
call fcn.1004b710
mov dword [esp + 0x1c], eax
add esp, 8
mov eax, 0x1000
cmp ebp, eax
jge 0x10049c8e
mov eax, ebp
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.10047920
add esp, 0xc
mov edi, eax
cmp edi, 0xffffffff
je 0x10049cac
sub ebp, edi
test ebp, ebp
jg 0x10049c83
jmp 0x10049cc3
call fcn.100481e0
cmp dword [eax], 5
jne 0x10049cc1
call fcn.100481d0
mov dword [eax], 0xd
mov ebx, edi
mov eax, dword [esp + 0x14]
push eax
push esi
call fcn.1004b710
add esp, 8
jmp 0x10049d15
jge 0x10049d15
push 0
push ecx
push esi
call fcn.10047ba0
add esp, 0xc
push esi
call fcn.10048480
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
sbb ebx, ebx
cmp ebx, 0xffffffff
jne 0x10049d15
call fcn.100481d0
mov dword [eax], 0xd
call fcn.100481e0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call fcn.10047ba0
add esp, 0xc
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1008
ret
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1008
ret
Function at 0x1004beb0
Capabilities:
Get geographical location

Disassembly:
push ebx
mov eax, dword [0x1001846c]
push esi
test eax, eax
push edi
push ebp
jne 0x1004bef8
push 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push 0
push 1
push 0
call esi
test eax, eax
je 0x1004bed8
mov eax, 1
jmp 0x1004befe
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x1004bef1
mov eax, 2
jmp 0x1004befe
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov dword [0x1001846c], eax
cmp eax, 1
jne 0x1004bf23
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov ebx, dword [esp + 0x18]
push ecx
push edx
push ebx
call esi
pop ebp
pop edi
pop esi
pop ebx
ret
mov dword [0x1001846c], eax
cmp eax, 2
jne 0x1004bfb1
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x1004bf3f
mov edi, dword [0x100179a8]
mov eax, dword [esp + 0x18]
push 0
mov ebx, dword [esp + 0x18]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ebp, eax
test ebp, ebp
jne 0x1004bf60
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
push ebp
call fcn.100409b0
add esp, 4
mov esi, eax
test esi, esi
jne 0x1004bf76
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [esp + 0x18]
push ebp
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x1004bfa6
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x1004bfb6
push 0
push 0
push 0xffffffffffffffff
push esi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jne 0x1004bfce
push esi
call fcn.100409c0
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
push eax
mov eax, dword [esp + 0x20]
push eax
push 0xffffffffffffffff
push esi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
je 0x1004bfa6
push esi
call fcn.100409c0
add esp, 4
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x1004bfe0
Capabilities:
Get geographical location

Disassembly:
push ebx
mov eax, dword [0x10018470]
push esi
test eax, eax
push edi
push ebp
jne 0x1004c028
push 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
push 0
push 1
push 0
call esi
test eax, eax
je 0x1004c008
mov eax, 2
jmp 0x1004c02e
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1004c021
mov eax, 1
jmp 0x1004c02e
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [0x10018470], eax
cmp eax, 2
jne 0x1004c053
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push eax
mov ebx, dword [esp + 0x18]
push ecx
push edx
push ebx
call esi
pop ebp
pop edi
pop esi
pop ebx
ret
mov dword [0x10018470], eax
cmp eax, 1
jne 0x1004c0ef
mov edi, dword [esp + 0x24]
test edi, edi
jne 0x1004c06f
mov edi, dword [0x100179a8]
mov eax, dword [esp + 0x18]
push 0
mov ebx, dword [esp + 0x18]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebp, eax
test ebp, ebp
jne 0x1004c090
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
lea eax, [ebp*2]
push eax
call fcn.100409b0
add esp, 4
mov esi, eax
test esi, esi
jne 0x1004c0ad
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [esp + 0x18]
push ebp
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1004c0e4
mov eax, dword [esp + 0x20]
push 0
push 0
test eax, eax
jne 0x1004c0f4
push 0
push 0
push 0xffffffffffffffff
push esi
push 0x220
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
jne 0x1004c10f
push esi
call fcn.100409c0
add esp, 4
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
ret
push eax
mov eax, dword [esp + 0x28]
push eax
push 0xffffffffffffffff
push esi
push 0x220
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x1004c0e4
push esi
call fcn.100409c0
add esp, 4
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x1004ed83
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
push ebx
push esi
push edi
xor esi, esi
push 0x64
lea eax, [ebp - 0xb8]
push esi
mov dword [ebp - 4], esi
push eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
call fcn.10068ed0
add esp, 0xc
lea eax, [ebp - 0x34]
push 0x28
push esi
push eax
call fcn.10068ed0
add esp, 0xc
lea eax, [ebp - 0x54]
push 0x1e
push esi
push eax
call fcn.10068ed0
add esp, 0xc
lea eax, [ebp - 0xb8]
push eax
push 0x10018850
call fcn.1004ec4b
add esp, 8
lea eax, [ebp - 0x34]
push eax
push 0x10018880
call fcn.1004ec4b
add esp, 8
lea eax, [ebp - 0x54]
push eax
push 0x10018890
call fcn.1004ec4b
add esp, 8
lea eax, [ebp - 4]
lea ecx, [ebp - 0xb8]
push eax
push ecx
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x1004ee28
cmp dword [ebp - 4], esi
je 0x1004eedc
jmp 0x1004eed3
lea eax, [ebp - 8]
xor ebx, ebx
push eax
lea ecx, [ebp - 0xc]
push ebx
lea eax, [ebp - 0x34]
push ecx
push ebx
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1004eed3
cmp dword [ebp - 8], ebx
je 0x1004eed3
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x1004eed3
lea eax, [ebp - 8]
lea ecx, [ebp - 0xc]
push eax
push edi
push ecx
lea eax, [ebp - 0x34]
push 0
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1004eecc
cmp dword [ebp - 0xc], 7
jne 0x1004eecc
mov ebx, edi
cmp byte [edi], 0
je 0x1004eeb2
lea eax, [ebp - 0x54]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x1004eead
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ebx, [eax + ebx + 1]
cmp byte [ebx], 0
jne 0x1004ee8c
jmp 0x1004eeb2
mov esi, 1
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x1004eec8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x1004eede
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10053492
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
push esi
lea eax, [ebp - 0x100]
mov esi, 0x100
push esi
push 0
push eax
call fcn.10068ed0
add esp, 0xc
lea eax, [ebp - 0x100]
push esi
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x100], 0
jne 0x100534d1
xor eax, eax
jmp 0x10053524
lea eax, [ebp - 0x100]
push eax
call fcn.1004d620
add esp, 4
inc eax
push eax
call fcn.100409b0
add esp, 4
mov esi, eax
call fcn.100641d0
cmp eax, 1
lea eax, [ebp - 0x100]
push eax
jne 0x10053519
call fcn.1004d620
add esp, 4
inc eax
lea ecx, [ebp - 0x100]
push eax
push esi
push ecx
call fcn.1005343c
add esp, 0xc
jmp 0x10053522
push esi
call fcn.1004d6a0
add esp, 8
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10055461
Capabilities:
Parse pe header

Disassembly:
mov eax, dword [esp + 4]
cmp word [eax], 0x5a4d
jne 0x10055499
mov ecx, dword [eax + 0x3c]
mov eax, dword [ecx + eax]
cmp ax, 0x454e
je 0x10055494
cmp ax, 0x454c
je 0x10055494
sub eax, 0x4550
cmp eax, 1
sbb eax, eax
and eax, 0xffffeb03
add eax, 0x5a4d
jmp 0x1005549b
movzx eax, ax
jmp 0x1005549b
xor eax, eax
ret

Function at 0x100554fc
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
push ebx
lea eax, [ebp - 0x1f8]
push esi
push edi
mov esi, 1
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
lea eax, [ebp - 0x280]
push eax
lea ecx, [ebp - 0x1f8]
push ecx
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
mov edi, eax
je 0x100555d1
xor ebx, ebx
push ebx
push ebx
push ebx
push 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x100555ca
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x100555b8
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 0xc]
call fcn.10055461
add esp, 4
cmp eax, 0x4550
jne 0x100555b8
lea eax, [ebp - 0xf4]
push eax
push dword [ebp - 0xc]
call fcn.1005549c
add esp, 8
test eax, eax
jne 0x100555b8
movzx eax, word [ebp - 0xb0]
cmp eax, 3
je 0x100555b6
cmp eax, 5
je 0x100555b6
mov esi, 1
cmp eax, 7
jne 0x100555b8
xor esi, esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10055b48
Capabilities:
Get disk information

Disassembly:
call fcn.10055ae8
test eax, eax
jne 0x10055b5f
call fcn.10055b0f
test eax, eax
jne 0x10055b5f
jmp fcn.10066948
ret

Function at 0x10055eca
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 4], 0x10
push esi
push 0x4e8
push 5
push 6
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov esi, eax
je 0x10055f4b
push dword [ebp - 4]
push 0
lea ecx, [ebp - 0x14]
push ecx
call fcn.10068ed0
add esp, 0xc
lea edx, [ebp - 0x14]
mov word [ebp - 0x14], 6
push dword [ebp - 4]
push edx
push esi
call sub.WSOCK32.dll_bind
cmp eax, 0xffffffff
je 0x10055f4b
lea eax, [ebp - 4]
lea ecx, [ebp - 0x14]
push eax
push ecx
push esi
call sub.WSOCK32.dll_getsockname
cmp eax, 0xffffffff
je 0x10055f4b
lea eax, [ebp - 0x14]
push eax
call fcn.10055e66
add esp, 4
push eax
push dword [ebp + 8]
call fcn.10044f60
add esp, 8
push esi
call sub.WSOCK32.dll_closesocket
xor eax, eax
jmp 0x10055f60
push 0x1001a7bc
push dword [ebp + 8]
call fcn.10044f60
add esp, 8
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10055f65
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
call fcn.100559a8
cmp eax, 1
jne 0x100560a6
lea eax, [ebp - 0x34]
push eax
call fcn.100559c0
add esp, 4
test eax, eax
je 0x10055f94
mov eax, 0xffffffff
jmp 0x10056131
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
push 0x1001a7fc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10055fca
push dword [ebp - 0x30]
push 4
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 4]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0x1e
push eax
push ecx
push 0x1001a7dc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x10055ffa
push dword [ebp + 8]
push 0x100187fc
jmp 0x10056123
lea eax, [ebp - 0x38]
lea ecx, [ebp - 8]
push eax
lea edx, [ebp - 0x34]
push ecx
xor eax, eax
push edx
push 0xf003f
push eax
push eax
push eax
push 0x1001a7dc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x1005602e
mov eax, 0xffffffff
jmp 0x10056131
push 0
mov esi, 0x100187fc
call fcn.10045250
add esp, 4
lea ecx, [ebp - 0x28]
push eax
push esi
push ecx
call fcn.10044f60
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
call fcn.1004d620
add esp, 4
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], eax
push eax
push ecx
push 1
push 0x1001a7dc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
test eax, eax
jne 0x10056093
push dword [ebp + 8]
push esi
lea ecx, [ebp - 0x28]
push ecx
call fcn.10069eb0
add esp, 0xc
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1005612f
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0xffffffff
jmp 0x10056131
lea eax, [ebp - 4]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0x1e
push eax
push ecx
push 0x1001a7dc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x100560d3
push dword [ebp + 8]
push 0x100187fc
jmp 0x10056123
push 0
mov esi, 0x100187fc
call fcn.10045250
add esp, 4
lea ecx, [ebp - 0x28]
push eax
push esi
push ecx
call fcn.10044f60
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
call fcn.1004d620
add esp, 4
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], eax
push eax
push ecx
push 1
push 0x1001a7dc
push reloc.WSOCK32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegSetValueA]
test eax, eax
mov eax, 0xffffffff
jne 0x10056131
push dword [ebp + 8]
push esi
lea ecx, [ebp - 0x28]
push ecx
call fcn.10069eb0
add esp, 0xc
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x1005978f
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov word [ebp - 0x10], 2
push dword [ebp + 8]
call sub.WSOCK32.dll_inet_addr
cmp dword [0x1001b2a4], 0
mov dword [ebp - 0xc], eax
jne 0x100597b4
call fcn.100592c7
mov eax, dword [0x1001b290]
test eax, eax
jne 0x100597c1
xor eax, eax
jmp 0x100597cb
push 2
lea ecx, [ebp - 0xc]
push 4
push ecx
call eax
mov esp, ebp
pop ebp
ret
Function at 0x1005a136
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov eax, 0x13e4
mov ebp, esp
call fcn.1004b780
push ebx
push esi
mov dword [ebp - 4], 0x32
push edi
call fcn.1004f241
cmp eax, 0x10
je 0x1005a160
cmp eax, 1
jle 0x1005a1af
test al, 4
je 0x1005a1af
cmp dword [ebp + 0x20], 0
mov eax, 0x10016448
je 0x1005a16e
mov eax, dword [ebp + 0x20]
cmp dword [ebp + 0x10], 0
mov esi, 0x10016448
je 0x1005a17c
mov esi, dword [ebp + 0x10]
cmp dword [ebp + 0xc], 0
mov edx, 0x10016448
je 0x1005a18a
mov edx, dword [ebp + 0xc]
cmp dword [ebp + 8], 0
mov ecx, 0x10016448
je 0x1005a198
mov ecx, dword [ebp + 8]
push eax
mov eax, dword [0x1001b43c]
push dword [ebp + 0x1c]
push esi
push edx
push ecx
push eax
push 0
call fcn.100551eb
add esp, 0x1c
cmp dword [ebp - 4], 0
jle 0x1005a1c7
lea ecx, [ebp - 0x13dc]
mov eax, dword [ebp - 4]
mov byte [ecx], 0
add ecx, 0x60
dec eax
jne 0x1005a1be
lea edx, [ebp - 0x13e4]
lea eax, [ebp - 4]
push dword [ebp + 0x20]
push 0
push dword [ebp + 0x1c]
push edx
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1005987f
add esp, 0x20
test eax, eax
jne 0x1005a2b4
xor esi, esi
mov eax, dword [ebp + 0x18]
cmp byte [ebp - 0x13dc], 0
mov byte [eax], 0
je 0x1005a2b2
lea edi, [ebp - 0x13dc]
cmp esi, dword [ebp - 4]
jge 0x1005a2b2
push edi
lea eax, [ebp - 0x24]
push eax
call fcn.1004d6a0
add esp, 8
push edi
call fcn.1004d620
add esp, 4
mov ebx, eax
push edi
call sub.WSOCK32.dll_inet_addr
push 2
push ebx
push edi
call fcn.1005978f
add esp, 0xc
test eax, eax
jne 0x1005a24f
push edi
lea eax, [ebp - 0x124]
push eax
jmp 0x1005a258
push dword [eax]
lea ecx, [ebp - 0x124]
push ecx
call fcn.1004d6a0
add esp, 8
push dword [ebp + 0x18]
call fcn.1004d620
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x124]
push eax
call fcn.1004d620
add esp, 4
add ebx, eax
cmp ebx, dword [ebp + 0x14]
jge 0x1005a2a5
lea eax, [ebp - 0x124]
push eax
push dword [ebp + 0x18]
call fcn.1004d6b0
add esp, 8
push 0x10018610
push dword [ebp + 0x18]
call fcn.1004d6b0
add esp, 8
add edi, 0x60
inc esi
cmp byte [edi], 0
jne 0x1005a20e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret