joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4510e0
Capabilities:
Get file size

Disassembly:
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 0x1408]
cmp eax, 0xffffffff
jne 0x451149
mov cl, byte [ebx + 0x1004]
lea eax, [ebx + 0x1004]
test cl, cl
jne 0x45110f
mov eax, 7
pop edi
mov dword [ebx + 0x1410], eax
pop esi
pop ebx
ret
push 0
push 0x80
push 3
push 0
push 1
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x451157
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x451157
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebx
ret
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x45116e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [ebx + 0x1410], eax
xor eax, eax
pop edi
pop esi
pop ebx
ret

Function at 0x451340
Capabilities:
Delete file

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0x1408]
cmp eax, 0xffffffff
je 0x45137b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x45137b
mov eax, dword [esi + 0x1410]
test eax, eax
jne 0x451375
call edi
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
mov al, byte [esp + 0xc]
mov dword [esi + 0x1408], 0xffffffff
test al, al
je 0x4513cd
mov al, byte [esi + 0x140c]
test al, al
je 0x4513cd
mov cl, byte [esi + 0x1004]
lea eax, [esi + 0x1004]
test cl, cl
je 0x4513cd
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
mov eax, dword [esi + 0x1410]
jne 0x4513d3
test eax, eax
jne 0x4513c7
call edi
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
mov eax, dword [esi + 0x1410]
pop edi
pop esi
ret 4

Function at 0x4513e0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, ecx
lea eax, [esp + 4]
mov ecx, dword [esp + 0x10]
push 0
push eax
mov eax, dword [esi + 0x1408]
push ecx
push edx
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x451444
cmp dword [esi + 0x1408], 0xffffffff
jne 0x451428
mov dword [esi + 0x1410], 3
xor eax, eax
pop esi
pop ecx
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
xor eax, eax
pop esi
pop ecx
ret 8
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 8

Function at 0x451550
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
mov dword [esp + 4], 0
mov al, byte [esi + 0x140d]
test al, al
jne 0x4515be
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [esp + 4]
push 0
push eax
mov eax, dword [esi + 0x1408]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4515be
cmp dword [esi + 0x1408], 0xffffffff
jne 0x4515a2
mov dword [esi + 0x1410], 3
xor eax, eax
pop esi
pop ecx
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
xor eax, eax
pop esi
pop ecx
ret 8
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 8
Function at 0x451ef0
Capabilities:
Clear file content

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esp + 8]
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x60]
test eax, eax
jne 0x451f29
mov edx, dword [esi + 0x1408]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x451f29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
mov eax, dword [esi + 0x1410]
pop esi
ret 4

Function at 0x452050
Capabilities:
Copy file

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x1408], 0xffffffff
je 0x452063
mov eax, dword [esi]
push 0
call dword [eax + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
and ecx, 0xff
lea eax, [esi + 0x1004]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x45208a
xor eax, eax
pop esi
ret 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
pop esi
ret 8

Function at 0x4520b0
Capabilities:
Delete file

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x1408], 0xffffffff
je 0x4520c3
mov eax, dword [esi]
push 0
call dword [eax + 8]
lea ecx, [esi + 0x1004]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4520d8
xor eax, eax
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x1410], eax
pop esi
ret
Function at 0x453d30
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
test eax, eax
push ebx
push ebp
push esi
push edi
mov edi, ecx
jne 0x453d55
mov eax, dword [edi + 0x42c]
mov ecx, dword [edi + 0x428]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov al, byte [edi + 0x430]
test al, al
jne 0x453d71
mov edx, dword [esp + 0x34]
mov eax, dword [edi + 0x428]
cmp eax, edx
je 0x453e54
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [eax]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call ebx
lea ecx, [esp + 0x10]
mov esi, eax
call sub.MFC42.DLL_CString::CString
cmp esi, 0xffffffff
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x20], 0x1e
mov dword [esp + 0x24], 0x32
mov dword [esp + 0x28], 0x64
mov dword [esp + 0x2c], 0
jne 0x453e2d
lea ebp, [esp + 0x14]
mov eax, dword [ebp]
test eax, eax
je 0x453e28
push eax
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [eax]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call ebx
lea ecx, [esp + 0x10]
mov esi, eax
call sub.MFC42.DLL_CString::CString
add ebp, 4
cmp esi, 0xffffffff
je 0x453de4
jmp 0x453e2d
cmp esi, 0xffffffff
je 0x453e54
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x10]
push 0
push eax
push ecx
push edx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
xor esi, esi
cmp eax, esi
je 0x453e68
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [edi + 0x428], esi
mov dword [edi + 0x42c], esi
mov byte [edi + 0x430], 0
mov dword [edi + 0x434], 0xffffffff
mov byte [edi + 0x438], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 8
Function at 0x453f00
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, dword [esp + 0xc]
mov al, byte [esi]
test al, al
jne 0x453f19
test edi, edi
jne 0x453f19
pop edi
mov al, 1
pop esi
ret 4
test al, al
jne 0x453f2c
push 0x404
push edi
push esi
call fcn.004625f0
add esp, 0xc
push ebx
push 0
mov ecx, esi
call fcn.00453d00
push 0x190
mov bl, 1
push str.VERSION
push str.INIFILEVERSION
mov ecx, esi
mov byte [esp + 0x1c], al
mov byte [esi + 0x432], bl
call fcn.00454320
push 0xf423f
push 0
push 0
push str.VERSION
push str.INIFILEVERSION
mov ecx, esi
call fcn.00454130
cmp eax, 0x190
je 0x453fc6
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x453f8f
and al, 0xfe
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x190
push str.VERSION
push str.INIFILEVERSION
mov ecx, esi
call fcn.00454320
push 0xf423f
push 0
push 0
push str.VERSION
push str.INIFILEVERSION
mov ecx, esi
call fcn.00454130
cmp eax, 0x190
jne 0x453fde
push 0xc8
push str.VERSION
push str.INIFILEVERSION
mov ecx, esi
call fcn.00454320
xor bl, bl
mov eax, dword [esp + 0x10]
mov ecx, esi
push eax
mov byte [esi + 0x432], 0
call fcn.00453d00
mov al, bl
pop ebx
pop edi
pop esi
ret 4
Function at 0x456c20
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x404
push esi
mov esi, ecx
push edi
xor edi, edi
cmp dword [esi + 0x2f0], edi
je 0x456c41
pop edi
xor al, al
pop esi
add esp, 0x404
ret 8
mov eax, dword [esp + 0x414]
cmp eax, edi
jne 0x456c52
lea eax, [esi + 0x865]
push eax
lea eax, [esp + 0xc]
push str.CIMCOMEMIPCSRVCONMUTEX_s
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
mov eax, dword [esi + 0x2f4]
add esp, 0xc
cmp eax, edi
jne 0x456cde
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [esi + 0x2f4], eax
je 0x456cc2
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x456c9a
mov ecx, dword [esi + 0x2f4]
push ecx
jmp 0x456cb6
mov edx, dword [esi + 0x2f4]
push edi
push edi
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x456cc2
mov eax, dword [esi + 0x2f4]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 0x2f4], edi
mov ecx, dword [esi + 0x2f4]
mov dword [esi + 0x2f8], 0xc
mov dword [esi + 0x2fc], ecx
mov dword [esi + 0x300], edi
lea edx, [esp + 8]
lea eax, [esi + 0x2f8]
push edx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, edi
mov dword [esi + 0x2f0], eax
jne 0x456d08
pop edi
xor al, al
pop esi
add esp, 0x404
ret 8
mov ecx, dword [esp + 0x410]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x456d3e
mov edx, dword [esi + 0x2f0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x2f0], edi
pop edi
xor al, al
pop esi
add esp, 0x404
ret 8
pop edi
mov al, 1
pop esi
add esp, 0x404
ret 8

Function at 0x457751
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
push edi
mov dword [esi + 0x24], 0
mov al, byte [0x4fa0c8]
test al, al
lea edi, [esi + 0x2dc]
je 0x457783
push 0x4fa0c8
push 0x3f
push 1
push 0
mov ecx, edi
call sub.MFC42.DLL_CAsyncSocket::Create
test eax, eax
jne 0x457796
jmp 0x4577b7
push 0
push 0x3f
push 1
push 0
mov ecx, edi
call sub.MFC42.DLL_CAsyncSocket::Create
test eax, eax
je 0x4577b7
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov ecx, edi
call sub.MFC42.DLL_CAsyncSocket::Connect
test eax, eax
jne 0x4577ce
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x4577ce
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x18], eax
pop edi
pop esi
pop ecx
ret 8
lea edx, [esp + 8]
push 4
mov dword [esi + 0x24], 1
mov eax, dword [esi + 0x2e0]
push edx
push 1
push 0xffff
push eax
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
mov dword [esi + 0x18], 0
pop edi
xor eax, eax
pop esi
pop ecx
ret 8
Function at 0x457811
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, ecx
test esi, esi
mov dword [esp + 4], 0x10
je 0x457828
lea eax, [esi + 0x2dc]
jmp 0x45782a
xor eax, eax
mov ecx, dword [esp + 0x14]
push edi
lea edi, [esp + 8]
add ecx, 0x2dc
push edi
lea edi, [esi + 0x30c]
mov edx, dword [ecx]
push edi
push eax
call dword [edx + 0x14]
test eax, eax
pop edi
jne 0x457862
call sub.WSOCK32.dll_WSAGetLastError
push eax
call fcn.00465ff0
add esp, 4
mov dword [esi + 0x18], eax
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 0x2e0]
lea eax, [esp + 0x14]
push 4
push eax
push 1
push 0xffff
push ecx
mov dword [esp + 0x28], 1
call sub.WSOCK32.dll_setsockopt
mov byte [esi + 0x1c], 1
mov dword [esi + 0x24], 2
mov dword [esi + 0x18], 0
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x458367
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
mov ecx, 0x4f0818
jmp 0x458350
push 0xffffffffffffffff
push 0x4b60e1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [esp + 0xc], esi
mov dword [esi + 4], ebx
push ebx
push ebx
push ebx
lea ecx, [esi + 0x24]
mov dword [esp + 0x24], ebx
call fcn.00479eec
push ebx
push ebx
push ebx
lea ecx, [esi + 0x38]
mov byte [esp + 0x24], 1
call fcn.00479eec
push ebx
push ebx
push ebx
lea ecx, [esi + 0x1c0]
mov byte [esp + 0x24], 2
call fcn.00479eec
mov ecx, 0x20
xor eax, eax
lea edi, [esi + 0x40]
mov dword [esi], ebx
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x14], 0x20
mov dword [esi + 0x808], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov byte [esi + 0x20], bl
mov byte [esi + 0x21], bl
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esi + 0xc0]
rep stosd dword es:[edi], eax
mov ecx, 0x20
or eax, 0xffffffff
lea edi, [esi + 0x140]
rep stosd dword es:[edi], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esi + 0x1c8]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esi + 0x2c8]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esi + 0x3c8]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esi + 0x4c8]
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esi + 0x508]
rep stosd dword es:[edi], eax
mov ecx, 0x40
or eax, 0xffffffff
lea edi, [esi + 0x608]
rep stosd dword es:[edi], eax
mov ecx, 0x40
or eax, 0xffffffff
lea edi, [esi + 0x708]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x458b10
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b61a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
push ebx
lea eax, [esi + 0x24]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CSingleLock::CSingleLock
push 0xffffffffffffffff
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], ebx
call sub.MFC42.DLL_CSingleLock::Lock
cmp dword [esi + 0x30], ebx
je 0x458bfe
push ebx
call dword [sym.imp.MSVCRT.dll_time]
mov edi, eax
mov eax, dword [esi + 0x30]
add esp, 4
cmp eax, ebx
je 0x458be1
mov ecx, dword [eax + 0x14]
add ecx, 0x1e
cmp ecx, edi
jge 0x458be1
call fcn.00465a30
test eax, eax
je 0x458b88
push str.Expired_command.
call fcn.00465a40
add esp, 4
mov ecx, dword [esi + 0x30]
mov eax, dword [ecx + 0x18]
cmp eax, ebx
je 0x458bb8
mov dword [esi + 0x30], eax
mov edx, dword [eax + 0x1c]
mov eax, dword [edx + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 0x1c]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esi + 0x30]
add esp, 8
mov dword [ecx + 0x1c], ebx
jmp 0x458bd3
mov ecx, dword [ecx + 4]
push ecx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esi + 0x30]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 8
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x30], ebx
mov edx, dword [esi + 0x34]
mov eax, dword [esi + 0x30]
inc edx
cmp eax, ebx
mov dword [esi + 0x34], edx
jne 0x458b68
mov edx, dword [esp + 0x34]
mov eax, dword [esi + 0x30]
mov ecx, dword [edx]
cmp ecx, ebx
je 0x458c25
cmp eax, ebx
je 0x458bfe
cmp dword [eax + 0x10], ecx
je 0x458c3e
mov eax, dword [eax + 0x18]
cmp eax, ebx
jne 0x458bf2
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CSingleLock::Unlock
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret 0x10
cmp eax, ebx
je 0x458bfe
mov ecx, dword [eax]
cmp byte [ecx + 0x1c], bl
jne 0x458c3e
cmp dword [eax + 0x10], ebx
je 0x458c3e
mov eax, dword [eax + 0x18]
cmp eax, ebx
jne 0x458c29
jmp 0x458bfe
cmp eax, ebx
je 0x458bfe
mov ecx, dword [eax + 0x1c]
cmp ecx, ebx
je 0x458c51
mov edi, dword [eax + 0x18]
mov dword [ecx + 0x18], edi
jmp 0x458c57
mov ecx, dword [eax + 0x18]
mov dword [esi + 0x30], ecx
mov ecx, dword [eax + 0x18]
cmp ecx, ebx
je 0x458c66
mov esi, dword [eax + 0x1c]
mov dword [ecx + 0x1c], esi
jmp 0x458c6c
mov ecx, dword [eax + 0x1c]
mov dword [esi + 0x2c], ecx
mov esi, dword [esp + 0x28]
mov ecx, dword [eax + 8]
push eax
mov dword [esi], ecx
mov esi, dword [esp + 0x30]
mov ecx, dword [eax + 0xc]
mov dword [esi], ecx
mov ecx, dword [eax + 0x10]
mov dword [edx], ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [eax + 4]
mov dword [ecx], edx
mov esi, dword [eax]
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0xc]
mov dword [esp + 0x20], 0xffffffff
call sub.MFC42.DLL_CSingleLock::Unlock
mov ecx, dword [esp + 0x18]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 0x10
Function at 0x45cda8
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
sub esp, 0x324
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, 1
mov eax, dword [esi + 0xf38]
xor ebp, ebp
cmp eax, edi
mov dword [esp + 0x14], 0xfeedf00d
mov dword [esp + 0x10], ebp
mov ebx, 0x12c
mov dword [esp + 0x18], ebp
jne 0x45cf7f
mov eax, dword [esi + 0xf28]
cmp eax, 0xffffffff
je 0x45cebf
mov dword [esp + 0x234], eax
mov dword [esp + 0x130], eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x12c]
push eax
push ecx
lea edx, [esp + 0x238]
push ebp
push edx
push ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0x30d40
mov dword [esp + 0x244], edi
mov dword [esp + 0x140], edi
call sub.WSOCK32.dll_select
cmp eax, ebp
je 0x45ceca
jle 0x45ce9e
mov ecx, dword [esi + 0xf28]
lea eax, [esp + 0x12c]
push eax
push ecx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x45cea2
mov eax, dword [esi + 0xf28]
lea edx, [esp + 0x1c]
push edx
push 0x4004667f
push eax
mov dword [esp + 0x28], ebp
call sub.WSOCK32.dll_ioctlsocket
mov eax, dword [esp + 0x1c]
cmp eax, edi
jb 0x45cea2
cmp eax, 0x100
push ebp
ja 0x45ce84
mov edx, dword [esi + 0xf28]
lea ecx, [esp + 0x2c]
push eax
push ecx
push edx
jmp 0x45ce95
mov ecx, dword [esi + 0xf28]
lea eax, [esp + 0x2c]
push 0x100
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, edi
jl 0x45cea2
cmp eax, ebp
jge 0x45ceca
mov edx, dword [esi + 0xf28]
push edx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 0xf28], 0xffffffff
mov ebx, 0xa
jmp 0x45ceca
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x18]
mov eax, ecx
cdq
idiv ebx
inc ecx
mov dword [esp + 0x18], ecx
test edx, edx
jne 0x45cf73
mov eax, dword [esi + 0xf28]
cmp eax, 0xffffffff
jne 0x45cf13
mov eax, dword [esp + 0x10]
mov ecx, eax
inc eax
cmp ecx, 2
mov dword [esp + 0x10], eax
jl 0x45cf05
mov dword [esi + 0xf34], 6
mov ecx, esi
call fcn.0045c670
mov ebx, 0xf
jmp 0x45cf73
push ebp
lea edx, [esp + 0x18]
push 4
push edx
push eax
mov ebx, 0x12c
call sub.WSOCK32.dll_send
mov edi, eax
cmp edi, 1
jge 0x45cf56
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x45cf56
mov eax, dword [esi + 0xf28]
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 0xf28], 0xffffffff
mov ebx, 0xf
jmp 0x45cf6e
cmp edi, ebp
jle 0x45cf6e
cmp dword [esp + 0x10], ebp
je 0x45cf6a
mov dword [esi + 0xf34], 5
mov dword [esp + 0x10], ebp
mov edi, 1
cmp dword [esi + 0xf38], edi
je 0x45cdd6
mov eax, dword [esi + 0xf28]
mov dword [esp + 0x14], 0xdeadbeef
cmp eax, 0xffffffff
je 0x45cfe2
push ebp
lea ecx, [esp + 0x18]
push 4
push ecx
push eax
call sub.WSOCK32.dll_send
mov edx, dword [esi + 0xf28]
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ebp
push ecx
push ebp
push ebp
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0x186a0
call sub.WSOCK32.dll_select
mov edx, dword [esi + 0xf28]
push edx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 0xf28], 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x324
ret
Function at 0x45d030
Capabilities:
Get hostname

Disassembly:
sub esp, 0x4a4
push ebx
mov ebx, ecx
push ebp
push esi
lea esi, [ebx + 0xf40]
push edi
mov ecx, 8
xor eax, eax
mov edi, esi
mov dword [esp + 0x18], esi
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x5c]
push eax
push ecx
mov dword [esp + 0x1c], 0xff
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
je 0x45d083
mov eax, dword [esp + 0x14]
test eax, eax
jbe 0x45d083
cmp eax, 0x100
jae 0x45d083
mov byte [esp + eax + 0x5c], 0
jmp 0x45d088
mov byte [esp + 0x5c], 0
lea edx, [esp + 0x5c]
push edx
call fcn.00462680
mov cl, byte [eax]
add esp, 4
test cl, cl
jne 0x45d0c1
push 0
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [esp + 0x64]
push str._08X_08X
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [esp + 0x5c]
push 0x12
push ecx
push esi
call fcn.004625f0
mov dx, word [esp + 0x4c4]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
add esp, 0xc
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x15c]
mov word [ebx + 0xf52], dx
push ecx
mov byte [esp + 0x20], 0x37
mov dword [esp + 0x24], eax
mov word [esp + 0x28], 0x100
call sub.NETAPI32.dll_Netbios
mov al, byte [esp + 0x15c]
xor ebp, ebp
test al, al
mov dword [esp + 0x10], ebp
jbe 0x45d23d
mov dl, byte [esp + ebp + 0x15d]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x1c], 0x32
push eax
mov byte [esp + 0x50], dl
call sub.NETAPI32.dll_Netbios
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
lea edx, [esp + 0x26]
rep stosd dword es:[edi], eax
mov cl, byte [esp + ebp + 0x15d]
mov edi, 0x4d43f8
mov byte [esp + 0x4c], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x1c], 0x33
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x260]
mov word [esp + 0x28], 0x258
mov dword [esp + 0x24], ecx
call sub.NETAPI32.dll_Netbios
test al, al
jne 0x45d21b
mov eax, dword [esp + 0x261]
mov ecx, dword [esp + 0x260]
mov edx, dword [esp + 0x25f]
and eax, 0xff
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0x25e]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x25d]
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0x25c]
shl edx, 8
and ecx, 0xff
or edx, ecx
mov ecx, dword [esp + 0x10]
shl edx, 0x10
xor eax, edx
xor ecx, eax
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x15c]
inc ebp
and edx, 0xff
cmp ebp, edx
jl 0x45d123
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
test eax, eax
jne 0x45d247
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [ebx + 0xf54], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
mov dword [ebx + 0xf58], eax
call dword [sym.imp.MSVCRT.dll_time]
add esp, 4
mov dword [ebx + 0xf58], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4a4
ret 4