joyce8/EMBER2024-capa huggingface dataset:
Function at 0x501550
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x5cfae6
mov eax, dword fs:[0]
push eax
sub esp, 0x20c
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x208], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0x220]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x230]
xor ebx, ebx
cmp ecx, ebx
je 0x5016e8
cmp byte [ecx], bl
je 0x5016e8
mov edi, 0xf
mov eax, ecx
mov dword [esp + 0xd8], edi
mov dword [esp + 0xd4], ebx
mov byte [esp + 0xc4], bl
lea esi, [eax + 1]
mov dl, byte [eax]
add eax, 1
cmp dl, bl
jne 0x5015c7
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0xc8]
call fcn.00409790
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0xc4]
mov dword [esp + 0x22c], ebx
call fcn.00425e40
mov ecx, eax
call fcn.00426430
cmp byte [eax], 0x5c
je 0x501614
push 0x5c
push 1
lea ecx, [esp + 0xc8]
call fcn.00406df0
push 1
push 2
lea ecx, [esp + 0x48]
call fcn.0040b040
push 0x5f42d8
lea ecx, [esp + 0xc4]
push ecx
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0x234], 1
call fcn.00409240
add esp, 8
push eax
call fcn.00409b60
add esp, 8
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x44]
call fcn.004094f0
mov ebp, 0x10
cmp dword [eax + 0x18], ebp
jb 0x501669
mov eax, dword [eax + 4]
jmp 0x50166c
add eax, 4
lea ecx, [esp + 0xdc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp dword [esp + 0x30], ebp
mov esi, eax
jb 0x501690
mov edx, dword [esp + 0x1c]
push edx
call fcn.00595eb8
add esp, 4
cmp esi, 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
jne 0x501714
lea ecx, [esp + 0x8c]
mov byte [esp + 0x228], bl
call fcn.00409e00
lea eax, [esp + 0x8c]
push eax
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
cmp dword [esp + 0xd8], ebp
jb 0x5016e8
mov ecx, dword [esp + 0xc4]
push ecx
call fcn.00595eb8
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x220]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.005b1988
add esp, 0x218
ret 4
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea ebx, [ebx]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0xdc]
push eax
call edx
lea eax, [esp + 0xdc]
push eax
push esi
call edi
test eax, eax
jne 0x501720
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x8c]
mov byte [esp + 0x228], bl
call fcn.00409e00
lea ecx, [esp + 0x8c]
push ecx
mov dword [esp + 0x90], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
cmp dword [esp + 0xd8], ebp
jb 0x50178f
mov edx, dword [esp + 0xc4]
push edx
call fcn.00595eb8
add esp, 4
mov eax, 1
jmp 0x5016ea
Function at 0x501c70
Capabilities:
Delete file
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x5cfb96
mov eax, dword fs:[0]
push eax
sub esp, 0x27c
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x278], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0x290]
mov dword fs:[0], eax
mov edi, dword [esp + 0x2a0]
test edi, edi
mov esi, dword [esp + 0x2a4]
je 0x501e6a
cmp byte [edi], 0
je 0x501e6a
test esi, esi
je 0x501e6a
cmp byte [esi], 0
je 0x501e6a
push 1
push 2
lea ecx, [esp + 0xd4]
call fcn.0040b040
push esi
push 0x5f4230
lea eax, [esp + 0xd4]
push edi
push eax
mov dword [esp + 0x2a8], 0
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
add esp, 8
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0xd0]
call fcn.004094f0
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x501d3f
mov eax, dword [eax + 4]
jmp 0x501d42
add eax, 4
lea edx, [esp + 0x14c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea ecx, [esp + 0x30]
mov esi, eax
call fcn.0040bf30
cmp esi, 0xffffffff
je 0x501e4c
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x501d70
push 1
call ebp
push 1
push 2
lea ecx, [esp + 0x54]
call fcn.0040b040
lea eax, [esp + 0x178]
push eax
lea ecx, [esp + 0x50]
push edi
push ecx
mov byte [esp + 0x2a4], 1
call fcn.00409b60
add esp, 8
push eax
call fcn.00409b60
mov edx, dword [esp + 0x154]
and edx, ebx
add esp, 8
cmp dl, bl
je 0x501dff
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x50]
call fcn.004094f0
cmp dword [eax + 0x18], ebx
jb 0x501dcd
mov eax, dword [eax + 4]
jmp 0x501dd0
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [esp + 0x2c], ebx
jb 0x501dea
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00595eb8
add esp, 4
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
lea ecx, [esp + 0x98]
mov byte [esp + 0x298], 0
call fcn.00409e00
lea edx, [esp + 0x98]
push edx
mov dword [esp + 0x9c], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
lea eax, [esp + 0x14c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x501d70
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0xcc]
mov dword [esp + 0x298], 0xffffffff
call fcn.00409dd0
mov eax, 1
jmp 0x501e6c
xor eax, eax
mov ecx, dword [esp + 0x290]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x278]
xor ecx, esp
call fcn.005b1988
add esp, 0x288
ret
Function at 0x504080
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x5cffac
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
push esi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0x124]
mov dword fs:[0], eax
mov esi, dword [esp + 0x134]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x504196
test al, 1
je 0x504196
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x504196
push 1
push 2
lea ecx, [esp + 0x2c]
call fcn.0040b040
mov dword [esp + 0x12c], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x28]
push str.setAttr_false___err
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 8]
push ecx
lea ecx, [esp + 0x28]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x12c], 1
jb 0x504139
mov eax, dword [eax + 4]
jmp 0x50413c
add eax, 4
push eax
push str.BaseLib::CxxDeleteFile
push 0x95e
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x20], esi
jb 0x504170
mov edx, dword [esp + 0xc]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x70]
mov dword [esp + 0x12c], 0xffffffff
call fcn.00409e00
lea eax, [esp + 0x70]
mov dword [esp + 0x70], vtable.std::ios_base.0
push eax
jmp 0x5042a3
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x5041bd
mov eax, 1
mov ecx, dword [esp + 0x124]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x128
ret
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x5042ab
push 1
push 2
lea ecx, [esp + 0xac]
call fcn.0040b040
mov dword [esp + 0x12c], 2
call esi
push eax
lea ecx, [esp + 0xa8]
push str.deletefile_false___err
push ecx
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea edx, [esp + 8]
push edx
lea ecx, [esp + 0xa8]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0x12c], 3
jb 0x504230
mov eax, dword [eax + 4]
jmp 0x504233
add eax, 4
push eax
push str.BaseLib::CxxDeleteFile
push 0x967
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x20], esi
jb 0x504267
mov eax, dword [esp + 0xc]
push eax
call fcn.00595eb8
add esp, 4
xor eax, eax
lea ecx, [esp + 0xf0]
mov dword [esp + 0x20], 0xf
mov dword [esp + 0x1c], eax
mov byte [esp + 0xc], al
mov dword [esp + 0x12c], 0xffffffff
call fcn.00409e00
lea ecx, [esp + 0xf0]
mov dword [esp + 0xf0], vtable.std::ios_base.0
push ecx
call fcn.005cdcde
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x124]
mov dword fs:[0], ecx
pop ecx
pop esi
add esp, 0x128
ret
Function at 0x504ca0
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1c]
sub esp, 0x1c
push 0xffffffffffffffff
push 0x5d0121
mov eax, dword fs:[0]
push eax
sub esp, 0x104
push ebx
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x24]
xor esi, esi
cmp eax, esi
je 0x504ed9
cmp byte [eax], 0
je 0x504ed9
mov ebx, 2
push 0x40000
mov dword [ebp - 4], ebx
call fcn.00595ebd
mov edi, eax
add esp, 4
cmp edi, esi
jne 0x504d99
push 1
push ebx
lea ecx, [ebp - 0x90]
call fcn.0040b040
lea eax, [ebp - 0x90]
push 0x5f4658
push eax
mov byte [ebp - 4], 3
call fcn.00409b60
add esp, 8
lea ecx, [ebp]
push ecx
lea ecx, [ebp - 0x90]
call fcn.004094f0
mov edi, 0x10
cmp dword [eax + 0x18], edi
mov byte [ebp - 4], 4
jb 0x504d50
mov esi, dword [eax + 4]
jmp 0x504d53
lea esi, [eax + 4]
call fcn.00409860
push esi
push str.BaseLib::CRC32File
push 0xb9a
push str..common_function.cpp
push 0xf0000000
mov ecx, eax
call fcn.004fb930
cmp dword [ebp + 0x18], edi
jb 0x504d85
mov edx, dword [ebp + 4]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], bl
call fcn.00409e00
lea eax, [ebp - 0x44]
push eax
jmp 0x504f69
mov ecx, dword [ebp + 0x24]
push 0x62c568
push ecx
or ebx, 0xffffffff
call fcn.005b1ae9
add esp, 8
mov dword [ebp + 0x24], eax
test eax, eax
mov dword [ebp - 4], 8
je 0x504e33
push eax
call fcn.005b35b0
add esp, 4
test eax, eax
jne 0x504e31
jmp 0x504dd0
mov edx, dword [ebp + 0x24]
push edx
mov eax, 0x40000
push eax
push 1
push edi
call fcn.005b2836
add esp, 0x10
test eax, eax
jle 0x504e21
push ebx
push eax
push edi
call fcn.004ff1d0
mov ebx, eax
add esi, 1
mov eax, 0x66666667
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
add eax, eax
add eax, eax
mov ecx, esi
add esp, 0xc
sub ecx, eax
jne 0x504e21
push 1
call fcn.00507ad0
add esp, 4
mov edx, dword [ebp + 0x24]
push edx
call fcn.005b35b0
add esp, 4
test eax, eax
je 0x504dd0
not ebx
push edi
call fcn.00595eb8
mov eax, dword [ebp + 0x24]
add esp, 4
test eax, eax
je 0x504e4c
push eax
call fcn.005b1fa4
add esp, 4
mov eax, ebx
jmp 0x504f7a
push 1
push 2
lea ecx, [ebp - 0x90]
call fcn.0040b040
lea edx, [ebp - 0x90]
push 0x62b300
push edx
mov dword [ebp - 4], esi
call fcn.00409b60
add esp, 8
lea eax, [ebp]
push eax
lea ecx, [ebp - 0x90]
call fcn.004094f0
mov edi, 0x10
cmp dword [eax + 0x18], edi
mov byte [ebp - 4], 1
jb 0x504f21
mov eax, dword [eax + 4]
jmp 0x504f24
add eax, 4
push eax
push str.BaseLib::CRC32File
push 0xb8f
push str..common_function.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [ebp + 0x18], edi
jb 0x504f56
mov ecx, dword [ebp + 4]
push ecx
call fcn.00595eb8
add esp, 4
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
call fcn.00409e00
lea edx, [ebp - 0x44]
push edx
mov dword [ebp - 0x44], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add ebp, 0x1c
mov esp, ebp
pop ebp
ret
Function at 0x5078b0
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x5078de
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.005b3649
mov dword [eax], esi
or eax, 0xffffffff
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x50793e
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.005b3649
mov dword [eax], esi
or eax, 0xffffffff
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x10]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
cmp eax, 0xffffffff
jne 0x507a2d
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.005b3649
mov dword [eax], esi
or eax, 0xffffffff
pop esi
ret

Function at 0x507a30
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
mov eax, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0xc]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x507a68
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.005b3649
mov dword [eax], esi
or eax, 0xffffffff
pop esi
ret

Function at 0x507aa0
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x507ace
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.005b3649
mov dword [eax], esi
or eax, 0xffffffff
pop esi
ret

Function at 0x507b10
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x507b35
mov eax, dword [esp + 0xc]
ret
or eax, 0xffffffff
ret
Function at 0x507b40
Capabilities:
Inspect section memory permissions

Disassembly:
mov eax, dword [esp + 8]
test al, 1
push esi
mov esi, closesocket
je 0x507b55
mov esi, 0x40000000
jmp 0x507b5e
test al, 2
je 0x507b5e
mov esi, 0xc0000000
mov ecx, eax
and ecx, 0x500
cmp ecx, 0x500
mov edx, 3
jne 0x507b7a
mov edx, 1
jmp 0x507bab
mov ecx, eax
and ecx, 0x300
cmp ecx, 0x300
jne 0x507b91
mov edx, 2
jmp 0x507bab
test eax, 0x100
je 0x507b9f
mov edx, 4
jmp 0x507bab
test eax, 0x200
je 0x507bab
mov edx, 5
xor ecx, ecx
test al, 0x40
je 0x507bb6
mov ecx, 0x4000100
test eax, eax
jns 0x507bc0
or ecx, 0x80000000
test eax, 0x40000000
je 0x507bcd
or ecx, 0x40000000
test eax, 0x20000000
je 0x507bda
or ecx, 0x20000000
test eax, 0x10000000
je 0x507be7
or ecx, 0x10000000
test eax, 0x8000000
je 0x507bf4
or ecx, 0x8000000
test eax, 0x4000000
je 0x507c01
or ecx, 0x4000000
test eax, 0x2000000
je 0x507c0e
or ecx, 0x2000000
test eax, 0x1000000
je 0x507c1b
or ecx, 0x1000000
mov eax, dword [esp + 0x10]
push 0
push ecx
mov ecx, dword [esp + 0x10]
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
pop esi
ret

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

Disassembly:
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 8]
push ebx
mov ebx, dword [esp + 0x14]
push edi
mov edi, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x10]
push ecx
push ebx
push edi
push edx
push eax
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x507c96
push esi
call fcn.005b3649
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi], eax
call fcn.005b3649
cmp dword [eax], 0x2738
pop esi
jne 0x507c93
test bl, 2
je 0x507c93
mov eax, edi
pop edi
pop ebx
ret
or eax, 0xffffffff
pop edi
pop ebx
ret

Function at 0x507ca0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x1c
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x18], eax
push esi
push 0x5f49a4
push 0x5f4994
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x507d1f
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [esp + 8]
push eax
push 0x40
push 5
push esi
mov byte [esp + 0x20], 0x33
mov byte [esp + 0x21], 0xc0
mov byte [esp + 0x22], 0xc2
mov byte [esp + 0x23], 4
mov byte [esp + 0x24], 0
call edi
push 0
push 5
lea ecx, [esp + 0x18]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [esp + 8]
lea edx, [esp + 0xc]
push edx
push eax
push 5
push esi
call edi
pop edi
mov ecx, dword [esp + 0x1c]
pop esi
xor ecx, esp
call fcn.005b1988
add esp, 0x1c
ret
Function at 0x509f63
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push esi
mov esi, ecx
xor eax, eax
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, dword [esi + 4]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x509fa9
mov eax, dword [esp + 0x20]
pop esi
add esp, 0x14
ret 0x10
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xea
jne 0x509fc5
mov eax, dword [esp + 0x24]
pop edi
pop esi
add esp, 0x14
ret 0x10
call edi
cmp eax, 0x3e5
jne 0x50a014
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x509fdd
call fcn.0052b150
jmp 0x509fe0
or eax, 0xffffffff
mov ecx, dword [esi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x50a014
mov esi, dword [esi + 4]
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x50a014
mov eax, dword [esp + 0x24]
test eax, eax
ja 0x50a017
or eax, 0xffffffff
pop edi
pop esi
add esp, 0x14
ret 0x10

Function at 0x50a040
Capabilities:
Create pipe

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 0x238]
mov ecx, dword [esi + 0x234]
push eax
push 0
push 0xa000
push 0xa000
push 0xff
push ecx
push 0x40000003
lea edx, [esi + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov dword [esi + 4], eax
pop esi
sub ecx, 1
mov eax, ecx
ret 4

Function at 0x50a760
Capabilities:
Create pipe

Disassembly:
mov eax, dword [esp + 4]
push ebx
mov ebx, ecx
mov ecx, dword [eax + 4]
push esi
push edi
mov dword [ebx + 0x10], ecx
mov edx, dword [eax + 8]
mov dword [ebx + 0x14], edx
lea esi, [eax + 0xc]
mov eax, dword [esp + 0x20]
lea edi, [ebx + 0x18]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x1c]
push ecx
push 0
push 0xa000
push 0xa000
push 0xff
movsb byte es:[edi], byte [esi]
push eax
mov dword [ebx + 0x234], eax
push 0x40000003
lea eax, [ebx + 0x18]
push eax
mov dword [ebx + 4], 0xffffffff
mov dword [ebx + 0x238], ecx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
pop edi
mov dword [ebx + 4], eax
pop esi
pop ebx
sub ecx, 1
mov eax, ecx
ret 0x14
Function at 0x50b530
Capabilities:
Connect pipe

Disassembly:
push 0xffffffffffffffff
push 0x5d47f6
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
push ebp
push esi
push edi
mov eax, dword [0x65d4e4]
xor eax, esp
push eax
lea eax, [esp + 0xac]
mov dword fs:[0], eax
mov ebp, ecx
mov ecx, dword [esp + 0xc4]
test ecx, ecx
je 0x50b587
mov edx, dword [esp + 0xc8]
mov eax, dword [ebp + 4]
push edx
push ecx
push eax
call fcn.0052b490
add esp, 0xc
cmp eax, 0xffffffff
je 0x50b6b4
mov eax, dword [ebp + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x50b5af
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
xor ecx, ecx
cmp eax, 0x217
sete cl
mov eax, ecx
test eax, eax
je 0x50b5e6
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0xbc]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x10], ecx
mov edx, dword [ebp + 0x14]
mov dword [eax + 0x14], edx
lea edi, [eax + 0x18]
lea esi, [ebp + 0x18]
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, ebp
movsb byte es:[edi], byte [esi]
call fcn.0050a040
xor eax, eax
jmp 0x50b6b7
push 1
push 2
lea ecx, [esp + 0x34]
call fcn.0040b040
mov dword [esp + 0xb4], 0
call esi
push eax
lea eax, [esp + 0x30]
push str.ConnectNamedPipe:
push eax
call fcn.00409b60
add esp, 8
mov ecx, eax
call fcn.004024e0
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x30]
call fcn.004094f0
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xb4], 1
jb 0x50b63f
mov eax, dword [eax + 4]
jmp 0x50b642
add eax, 4
push eax
push str.BaseLib::CSPIPEAcceptor::Accept
push 0x703
push str..common_socket.cpp
push 0xf0000000
call fcn.00409860
mov ecx, eax
call fcn.004fb930
cmp dword [esp + 0x28], esi
jb 0x50b676
mov edx, dword [esp + 0x14]
push edx
call fcn.00595eb8
add esp, 4
lea ecx, [esp + 0x78]
mov dword [esp + 0x28], 0xf
mov dword [esp + 0x24], 0
mov byte [esp + 0x14], 0
mov dword [esp + 0xb4], 0xffffffff
call fcn.00409e00
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x7c], vtable.std::ios_base.0
call fcn.005cdcde
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0xac]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0xa8
ret 0x14
Function at 0x50b860
Capabilities:
Set registry value

Disassembly:
mov eax, 0x100c
call fcn.005b6f10
mov eax, dword [0x65d4e4]
xor eax, esp
mov dword [esp + 0x1008], eax
mov eax, dword [esp + 0x1010]
push esi
push edi
mov edi, dword [esp + 0x101c]
mov esi, ecx
lea ecx, [esp + 8]
push ecx
push 0xf003f
push 0
push eax
push reloc.WS2_32.dll_bind
mov dword [esp + 0x1c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x50b8be
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x50b97f
mov ecx, dword [esp + 8]
push 0
lea eax, [esp + 0x10]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push edi
push ecx
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x50b96b
push 0xfff
push eax
lea ecx, [esp + 0x19]
push ecx
mov byte [esp + 0x1c], al
call fcn.005b5540
add esp, 0xc
cmp dword [esi + 0x34], 0x10
jb 0x50b910
mov ecx, dword [esi + 0x20]
jmp 0x50b913
lea ecx, [esi + 0x20]
cmp dword [esi + 0x18], 0x10
lea edi, [esi + 4]
jb 0x50b920
mov eax, dword [edi]
jmp 0x50b922
mov eax, edi
push ecx
push eax
push str._s::Enabled:_s
lea edx, [esp + 0x1c]
push 0x1000
push edx
call fcn.005b1bc7
lea eax, [esp + 0x24]
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x50b942
sub eax, edx
cmp dword [esi + 0x18], 0x10
jb 0x50b955
mov edi, dword [edi]
mov ecx, dword [esp + 0xc]
push eax
lea eax, [esp + 0x14]
push eax
push 1
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
mov eax, dword [esp + 8]
push eax
call esi
mov ecx, dword [esp + 0x1010]
pop edi
pop esi
xor ecx, esp
call fcn.005b1988
add esp, 0x100c
ret 8