joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4072a0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x421918
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x42d5dc]
xor eax, esp
mov dword [esp + 0x20], eax
push esi
mov eax, dword [0x42d5dc]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esp + 0x10]
mov dword [esp + 0xc], 0
call fcn.00407220
push 0x42a218
mov dword [esp + 0x3c], 0
call fcn.00405ef0
add esp, 4
push eax
push ecx
push 0x42a218
lea ecx, [esp + 0x1c]
call fcn.00407540
cmp eax, 0xffffffff
je 0x407321
push eax
push 0
push esi
lea ecx, [esp + 0x1c]
call fcn.00407470
jmp 0x40732d
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call fcn.004054c0
lea ecx, [esp + 0x10]
call fcn.00405740
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.0040e691
mov esp, ebp
pop ebp
ret

Function at 0x407360
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42194e
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x42d5dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [0x432f2c]
mov dword [ebp - 0x234], 0
test al, 1
jne 0x4073ce
or eax, 1
mov dword [0x432f2c], eax
mov ecx, 0x432f30
mov dword [ebp - 4], 0
call fcn.00405710
push 0x421b90
call fcn.0040e8bb
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp dword [0x432f40], 0
jne 0x40743e
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00412ce0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
mov ecx, 0x432f30
push eax
call fcn.004040a0
mov edx, 0x432f30
lea ecx, [ebp - 0x230]
call fcn.00407190
push eax
mov ecx, 0x432f30
call fcn.00403ff0
lea ecx, [ebp - 0x230]
call fcn.00405740
push 0x432f30
mov ecx, esi
call fcn.00403fa0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e691
mov esp, ebp
pop ebp
ret
Function at 0x4075e0
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get file attributes
Move file
Set file attributes
Write file on windows

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406fa6
test al, 0x10
jne 0x406fa6
mov eax, 1
ret
xor eax, eax
ret
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
push edi
push edx
movzx eax, ax
mov esi, ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x407619
push str.ResourceToFile_FindResource_hResInfo__NULL_Failed
push 0xb4
push str.Resourcecommon.cpp
call fcn.004065b0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
ret
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x40762c
push str.ResourceToFile_LoadResource_hResData__NULL_Failed
jmp 0x407601
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp + 8], eax
test eax, eax
je 0x407661
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
test ebx, ebx
jne 0x407667
push str.ResourceToFile_SizeofResource_FileSize__0_Failed
push 0xb4
push str.Resourcecommon.cpp
call fcn.004065b0
add esp, 0xc
pop ebx
pop edi
xor eax, eax
pop esi
pop ebp
ret
mov esi, dword [ebp + 0xc]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x407698
push 0x80
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x407698
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0x80
push esi
call edi
push 0x42a460
push esi
call fcn.00410aed
mov edi, eax
add esp, 8
test edi, edi
je 0x407660
push edi
push ebx
push 1
push dword [ebp + 8]
call fcn.0040fdc1
add esp, 0x10
cmp eax, ebx
je 0x4076eb
push str.ResourceToFile_RealSize___FileSize_Failed
push 0xb4
push str.Resourcecommon.cpp
call fcn.004065b0
push edi
call fcn.004100c6
add esp, 0x10
xor eax, eax
pop ebx
pop edi
pop esi
pop ebp
ret
push edi
call fcn.004100c6
add esp, 4
mov ecx, esi
pop ebx
pop edi
pop esi
pop ebp
jmp 0x406f90
Function at 0x407a40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ecx
xor eax, eax
mov edx, eax
mov ecx, eax
and edx, 1
shr ecx, 1
dec edx
not edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
dec edx
not edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
dec edx
not edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, edx
mov edx, ecx
shr ecx, 1
and edx, 1
dec edx
not edx
and edx, 0xedb88320
xor edx, ecx
mov ecx, edx
shr edx, 1
and ecx, 1
dec ecx
not ecx
and ecx, 0xedb88320
xor ecx, edx
mov dword [eax*4 + 0x430eb0], ecx
inc eax
cmp eax, 0x100
jb 0x407a43
cmp eax, 0x800
jae 0x407b13
nop
mov edx, dword [eax*4 + 0x430ab0]
movzx ecx, dl
shr edx, 8
xor edx, dword [ecx*4 + 0x430eb0]
mov dword [eax*4 + 0x430eb0], edx
inc eax
cmp eax, 0x800
jb 0x407af0
mov dword [0x432ebc], 0x4082e0
call fcn.00407990
mov ecx, dword [0x432ebc]
test eax, eax
mov edx, 0x408380
cmove ecx, edx
mov dword [0x432ebc], ecx
pop ecx
ret

Function at 0x407b40
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4219c8
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x42d5dc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.00405f80
sub esp, 8
mov dword [ebp - 4], 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x48], 0x5c
lea ecx, [ebp - 0x2c]
push eax
call fcn.004074d0
push eax
push 0
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00407470
push 0
lea ecx, [ebp - 0x44]
call fcn.004056f0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
call esi
cmp dword [edi], 0xffffffff
je 0x407be2
xor esi, esi
jmp 0x407be6
call esi
mov esi, eax
lea ecx, [ebp - 0x44]
call fcn.00405740
lea ecx, [ebp - 0x2c]
call fcn.00405740
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040e691
mov esp, ebp
pop ebp
ret
Function at 0x407c50
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 4], ecx
mov esi, dword [edi]
test esi, esi
je 0x407caf
mov dword [edi], 0
mov edx, 0x400000
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
cmp esi, 0x400000
mov eax, esi
cmova eax, edx
push eax
push ebx
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 8]
add ebx, ecx
add dword [edi], ecx
sub esi, ecx
test eax, eax
je 0x407cb8
test ecx, ecx
je 0x407caf
mov ecx, dword [ebp - 4]
mov edx, 0x400000
test esi, esi
jne 0x407c70
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x407cd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 4], ecx
mov esi, dword [edi]
test esi, esi
je 0x407d2f
mov dword [edi], 0
mov edx, 0x400000
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
cmp esi, 0x400000
mov eax, esi
cmova eax, edx
push eax
push ebx
push dword [ecx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp + 8]
add ebx, ecx
add dword [edi], ecx
sub esi, ecx
test eax, eax
je 0x407d38
test ecx, ecx
je 0x407d2f
mov ecx, dword [ebp - 4]
mov edx, 0x400000
test esi, esi
jne 0x407cf0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d880
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov eax, dword [eax]
and eax, 7
cmp edx, 5
jae 0x40d8a0
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
add edx, 0xfffffffc
or ebx, 0xffffffff
add edx, ecx
push esi
mov dword [ebp - 8], edx
lea ecx, [ecx]
lea esi, [edi + ecx]
cmp esi, edx
jae 0x40d8c9
mov cl, byte [esi]
and cl, 0xfe
cmp cl, 0xe8
je 0x40d8c6
inc esi
cmp esi, edx
jb 0x40d8b7
mov ecx, dword [ebp - 4]
mov edi, esi
sub edi, ecx
mov ecx, edi
sub ecx, ebx
cmp esi, edx
jae 0x40d9d1
cmp ecx, 3
jbe 0x40d8e2
xor eax, eax
jmp 0x40d920
dec ecx
shl eax, cl
and eax, 7
je 0x40d920
movzx ecx, byte [eax + 0x42873c]
mov edx, esi
sub edx, ecx
cmp byte [eax + 0x428744], 0
mov cl, byte [edx + 4]
je 0x40d90a
test cl, cl
je 0x40d90a
cmp cl, 0xff
jne 0x40d91d
mov edx, dword [ebp - 8]
and eax, 3
mov ecx, dword [ebp - 4]
add eax, eax
mov ebx, edi
or eax, 1
inc edi
jmp 0x40d8b0
mov edx, dword [ebp - 8]
mov cl, byte [esi + 4]
mov ebx, edi
mov dword [ebp - 0x10], ebx
test cl, cl
je 0x40d942
cmp cl, 0xff
je 0x40d942
mov ecx, dword [ebp - 4]
and eax, 3
add eax, eax
or eax, 1
inc edi
jmp 0x40d8b0
movzx edx, cl
movzx ecx, byte [esi + 3]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 2]
shl edx, 8
or edx, ecx
movzx ecx, byte [esi + 1]
shl edx, 8
or edx, ecx
sub edx, edi
lea ebx, [edx - 5]
test eax, eax
je 0x40d99e
movzx edx, byte [eax + 0x42873c]
mov ecx, 0x18
shl edx, 3
sub ecx, edx
mov dword [ebp - 0xc], edx
mov edx, ebx
shr edx, cl
test dl, dl
je 0x40d98a
cmp dl, 0xff
jne 0x40d99e
mov ecx, 0x20
mov edx, 1
sub ecx, dword [ebp - 0xc]
shl edx, cl
dec edx
xor edx, ebx
jmp 0x40d960
mov edx, dword [ebp - 8]
mov ecx, ebx
shr ecx, 0x18
and cl, 1
mov byte [esi + 1], bl
dec cl
not cl
mov byte [esi + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [esi + 3], cl
mov ecx, ebx
mov ebx, dword [ebp - 0x10]
shr ecx, 8
add edi, 5
mov byte [esi + 2], cl
mov ecx, dword [ebp - 4]
jmp 0x40d8b0
pop esi
pop ebx
cmp ecx, 3
jbe 0x40d9e6
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
dec ecx
shl eax, cl
mov ecx, dword [ebp + 0xc]
and eax, 7
mov dword [ecx], eax
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x41c6ad
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x42d5dc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.00412f15
mov dword [ebp - 0x14], eax
cmp dword [0x430e24], esi
jne 0x41c7a0
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x41c72d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x41c880
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x41c880
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41c880
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x430e24], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x430e28], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x430e2c], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x430e34], eax
test eax, eax
je 0x41c79d
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x430e30], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x41c7c5
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x41c7b8
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x41c7da
push 4
pop eax
jmp 0x41c882
cmp dword [ebp - 0x14], esi
je 0x41c7da
push dword [0x430e24]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x41c7bf
mov eax, dword [0x430e30]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x41c838
cmp dword [0x430e34], edi
je 0x41c838
push eax
call ebx
push dword [0x430e34]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x41c838
test eax, eax
je 0x41c838
call ecx
test eax, eax
je 0x41c82d
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x41c82d
test byte [ebp - 8], 1
jne 0x41c838
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x41c868
mov eax, dword [0x430e28]
cmp eax, edi
je 0x41c865
push eax
call ebx
test eax, eax
je 0x41c865
call eax
mov esi, eax
test esi, esi
je 0x41c865
mov eax, dword [0x430e2c]
cmp eax, edi
je 0x41c865
push eax
call ebx
test eax, eax
je 0x41c865
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x430e24]
call ebx
test eax, eax
je 0x41c880
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x41c882
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e691
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e4
lea eax, [ebp - 0x1e0]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0
jne 0x40102b
jmp 0x401059
mov ecx, dword [ebp - 0x1e4]
push ecx
push str._d_is_the_err
lea edx, [ebp - 0x50]
push edx
call fcn.00402805
add esp, 0xc
push str.Error
lea eax, [ebp - 0x50]
push eax
push str._s___s_n
call fcn.004027d4
add esp, 0xc
mov eax, dword [ebp - 0x1e4]
mov esp, ebp
pop ebp
ret

Function at 0x401063
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x401092
push str.socket___failed_n
call fcn.004027d4
add esp, 4
or eax, 0xffffffff
jmp 0x401147
mov eax, dword [ebp + 8]
and eax, 0xffff
test eax, eax
je 0x4010de
mov word [ebp - 0x10], 2
mov dword [ebp - 0xc], 0
mov cx, word [ebp + 8]
push ecx
call sub.WSOCK32.dll_htons
mov word [ebp - 0xe], ax
push 0x10
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x14]
push eax
call sub.WSOCK32.dll_bind
test eax, eax
je 0x4010de
push str.bind_error_n
call fcn.004027d4
add esp, 4
or eax, 0xffffffff
jmp 0x401147
push 0x10
push 0
lea ecx, [ebp - 0x10]
push ecx
call fcn.00402860
add esp, 0xc
mov word [ebp - 0x10], 2
mov edx, dword [ebp + 0xc]
push edx
call fcn.004026a1
add esp, 4
mov dword [ebp - 0xc], eax
mov ax, word [ebp + 0x10]
push eax
call sub.WSOCK32.dll_htons
mov word [ebp - 0xe], ax
push 0x10
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call sub.WSOCK32.dll_connect
test eax, eax
jge 0x401144
mov eax, dword [ebp - 0x14]
push eax
call sub.WSOCK32.dll_closesocket
push str.connect___failed_n
call fcn.004027d4
add esp, 4
call fcn.00401a50
or eax, 0xffffffff
jmp 0x401147
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret
Function at 0x401159
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov word [ebp - 0x814], 4
mov dword [ebp - 0x812], 0xffffffff
push 0x40e420
call fcn.00402c00
add esp, 4
add eax, 1
push eax
push 0x40e420
lea eax, [ebp - 0x80c]
push eax
call fcn.004028c0
add esp, 0xc
push 0x40e420
call fcn.00402c00
add esp, 4
add eax, 1
mov word [ebp - 0x80e], ax
mov dword [0x40b1dc], 1
mov ecx, dword [ebp - 0x80e]
and ecx, 0xffff
add ecx, 8
mov dword [ebp - 4], ecx
push 0
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0x814]
push eax
mov ecx, dword [0x40e4a8]
push ecx
call sub.WSOCK32.dll_send
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 4]
je 0x40121a
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.send_error__cnt_d__ret_d_n
call fcn.004027d4
add esp, 0xc
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x4012fa
push 0
push 0x400
lea edx, [ebp - 0x40c]
push edx
mov eax, dword [0x40e4a8]
push eax
call sub.WSOCK32.dll_recv
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jg 0x401261
mov ecx, dword [ebp - 0xc]
push ecx
push str.receive_error__ret_d_n
call fcn.004027d4
add esp, 8
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x4012fa
lea edx, [ebp - 0x40c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
xor ecx, ecx
mov cx, word [eax]
mov dword [ebp - 0x818], ecx
cmp dword [ebp - 0x818], 3
je 0x4012b2
cmp dword [ebp - 0x818], 5
je 0x40128c
jmp 0x4012c7
cmp dword [ebp - 0xc], 8
je 0x4012a6
mov edx, dword [ebp - 8]
add edx, 8
push edx
push 0x40b0b8
call fcn.004027d4
add esp, 8
mov dword [0x40e184], 1
jmp 0x4012f8
call fcn.0040194c
mov eax, dword [0x40e4a8]
push eax
call fcn.0040114b
add esp, 4
jmp 0x4012f8
mov ecx, dword [ebp - 8]
xor edx, edx
mov dx, word [ecx]
push edx
push 0x40b0bc
call fcn.004027d4
add esp, 8
mov dword [0x40b1e4], 9
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x4012fa
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4012fe
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov word [ebp - 0x814], 5
mov word [ebp - 0x80e], 0
mov dword [ebp - 0x812], 0xffffffff
mov dword [0x40b1dc], 1
mov dword [ebp - 4], 8
push 0
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0x814]
push ecx
mov edx, dword [0x40e4a8]
push edx
call sub.WSOCK32.dll_send
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 4]
je 0x40136c
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x401467
push 0
push 0x400
lea ecx, [ebp - 0x40c]
push ecx
mov edx, dword [0x40e4a8]
push edx
call sub.WSOCK32.dll_recv
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jg 0x4013a3
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x401467
lea eax, [ebp - 0x40c]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
xor edx, edx
mov dx, word [ecx]
mov dword [ebp - 0x818], edx
cmp dword [ebp - 0x818], 3
je 0x40141e
cmp dword [ebp - 0x818], 4
je 0x4013d7
cmp dword [ebp - 0x818], 5
je 0x4013f8
jmp 0x401434
cmp dword [ebp - 0xc], 8
je 0x4013f1
mov eax, dword [ebp - 8]
add eax, 8
push eax
push 0x40b0d8
call fcn.004027d4
add esp, 8
call fcn.00401159
jmp 0x401465
cmp dword [ebp - 0xc], 8
je 0x401412
mov ecx, dword [ebp - 8]
add ecx, 8
push ecx
push 0x40b0dc
call fcn.004027d4
add esp, 8
mov dword [0x40e184], 1
jmp 0x401465
call fcn.0040194c
mov edx, dword [0x40e4a8]
push edx
call fcn.0040114b
add esp, 4
jmp 0x401465
mov eax, dword [ebp - 8]
xor ecx, ecx
mov cx, word [eax]
push ecx
push 0x40b0e0
call fcn.004027d4
add esp, 8
mov dword [0x40b1e4], 9
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x401467
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x40146b
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov word [ebp - 0x814], 6
push 0x10
push 0x40f0e0
lea eax, [ebp - 0x80c]
push eax
call fcn.004028c0
add esp, 0xc
mov word [ebp - 0x80e], 0x10
mov dword [ebp - 0x812], 0xffffffff
mov ecx, dword [ebp - 0x80e]
and ecx, 0xffff
add ecx, 8
mov dword [ebp - 4], ecx
push 0
mov edx, dword [ebp - 0x80e]
and edx, 0xffff
add edx, 8
push edx
lea eax, [ebp - 0x814]
push eax
mov ecx, dword [0x40e4a8]
push ecx
call sub.WSOCK32.dll_send
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 4]
je 0x4014fc
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x40166c
push 0
push 0x400
lea eax, [ebp - 0x40c]
push eax
mov ecx, dword [0x40e4a8]
push ecx
call sub.WSOCK32.dll_recv
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jg 0x401533
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x40166c
lea edx, [ebp - 0x40c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
xor ecx, ecx
mov cx, word [eax]
mov dword [ebp - 0x818], ecx
cmp dword [ebp - 0x818], 3
je 0x401588
cmp dword [ebp - 0x818], 6
je 0x4015a0
cmp dword [ebp - 0x818], 7
je 0x40156a
jmp 0x40162a
mov edx, dword [0x40e4a8]
push edx
call fcn.0040114b
add esp, 4
mov dword [0x40e160], 1
jmp 0x40166a
call fcn.0040194c
mov eax, dword [0x40e4a8]
push eax
call fcn.0040114b
add esp, 4
jmp 0x40166a
mov ecx, dword [ebp - 8]
xor edx, edx
mov dx, word [ecx + 6]
push edx
mov eax, dword [ebp - 8]
add eax, 8
push eax
push 0x40ece0
call fcn.004028c0
add esp, 0xc
mov ecx, dword [ebp - 8]
xor edx, edx
mov dx, word [ecx + 6]
push edx
lea eax, [ebp - 0x80c]
push eax
push 0x40ece0
call fcn.00402c80
add esp, 0xc
test eax, eax
jg 0x401602
mov ecx, dword [ebp - 8]
xor edx, edx
mov dx, word [ecx + 6]
push edx
lea eax, [ebp - 0x80c]
push eax
push 0x40ece0
call fcn.00402c80
add esp, 0xc
test eax, eax
jge 0x401628
push str.Illegal_magic_string
call fcn.004027d4
add esp, 4
push 1
call fcn.004017b3
add esp, 4
mov ecx, dword [0x40e4a8]
push ecx
call fcn.0040114b
add esp, 4
jmp 0x40166a
mov edx, dword [ebp - 8]
xor eax, eax
mov ax, word [edx]
push eax
push str._nDAP_Response_Cmd_Error__d_n
call fcn.004027d4
add esp, 8
mov ecx, dword [0x40e4a8]
push ecx
call fcn.0040114b
add esp, 4
mov dword [0x40b1e4], 9
mov dword [0x40b1d8], 1
mov eax, 1
jmp 0x40166c
xor eax, eax
mov esp, ebp
pop ebp
ret