joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406a00
Capabilities:
Link many functions at runtime

Disassembly:
mov eax, dword [0x41794c]
test eax, eax
jne 0x406abd
push esi
push edi
push str.WINTRUST.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.CryptCATAdminAcquireContext
push esi
call edi
push str.CryptCATAdminReleaseContext
push esi
mov dword [0x417934], eax
call edi
push str.CryptCATAdminCalcHashFromFileHandle
push esi
mov dword [0x417938], eax
call edi
push str.CryptCATAdminEnumCatalogFromHash
push esi
mov dword [0x41793c], eax
call edi
push str.CryptCATAdminReleaseCatalogContext
push esi
mov dword [0x417940], eax
call edi
push str.WinVerifyTrust
push esi
mov dword [0x417944], eax
call edi
mov ecx, dword [0x417934]
pop edi
test ecx, ecx
mov dword [0x417948], eax
pop esi
je 0x406ab3
mov ecx, dword [0x417938]
test ecx, ecx
je 0x406ab3
mov ecx, dword [0x41793c]
test ecx, ecx
je 0x406ab3
mov ecx, dword [0x417940]
test ecx, ecx
je 0x406ab3
mov ecx, dword [0x417944]
test ecx, ecx
je 0x406ab3
test eax, eax
je 0x406ab3
mov eax, 1
mov dword [0x41794c], eax
ret
mov eax, 2
mov dword [0x41794c], eax
xor ecx, ecx
cmp eax, 1
sete cl
mov eax, ecx
ret

Function at 0x407040
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x168
lea eax, [esp + 4]
push ebx
push esi
mov esi, dword [esp + 0x174]
push edi
push eax
push esi
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
jne 0x40715d
push eax
push eax
push 3
push eax
push 3
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40715d
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x40
push edx
push esi
call edi
test eax, eax
je 0x407156
cmp word [esp + 0x14], 0x5a4d
jne 0x407156
mov eax, dword [esp + 0x50]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push eax
push esi
call ebx
cmp eax, dword [esp + 0x50]
jne 0x407156
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x84]
push pe_nt_image_headers32
push edx
push esi
call edi
test eax, eax
je 0x407156
cmp dword [esp + 0x7c], 0x4550
jne 0x407156
cmp word [esp + 0x82], 0
je 0x407156
mov eax, dword [esp + 0x90]
push 1
and eax, 0xffff
push 0
sub eax, 0xe0
push eax
push esi
call ebx
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x5c]
push 0x28
push edx
push esi
call edi
test eax, eax
je 0x407156
cmp dword [esp + 0xc], 0x28
jne 0x407156
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x54]
push str..Upack
push eax
call fcn.00408683
add esp, 8
neg eax
sbb eax, eax
pop edi
pop esi
inc eax
pop ebx
add esp, 0x168
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x168
ret
Function at 0x4071a0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411368
push 0x4090e0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor edi, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x24]
push eax
push 0x1000
mov esi, dword [ebp + 8]
push esi
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x407301
cmp dword [ebp - 0x24], edi
je 0x407301
mov dword [ebp - 0x34], esi
mov eax, dword [esi + 0x3c]
add eax, esi
mov dword [ebp - 0x2c], eax
xor ecx, ecx
mov cx, word [eax + 0x14]
lea ebx, [ecx + eax + 0x18]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
cmp dword [ebp - 0x1c], edi
jne 0x407324
xor edx, edx
mov dx, word [eax + 6]
cmp dword [ebp - 0x30], edx
jae 0x407324
mov ecx, 5
mov edi, str..rsrc
mov esi, ebx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4072e6
mov ecx, 3
mov edi, str..reloc
mov esi, ebx
xor edx, edx
repe cmpsw word [esi], word es:[edi]
je 0x4072e6
mov eax, dword [ebx + 0x10]
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x40728a
mov ecx, 3
mov edi, 0x414a60
mov esi, ebx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40728a
mov ecx, str..bss
mov edx, dword [ebx]
cmp edx, dword [ecx]
je 0x40728a
mov eax, dword [ebx + 8]
mov dword [ebp - 0x38], eax
xor esi, esi
mov dword [ebp - 0x3c], esi
cmp esi, dword [ebp - 0x38]
jae 0x4072e6
lea ecx, [ebp - 0x24]
push ecx
push 0x1000
mov edi, dword [ebp + 0xc]
push edi
mov edx, dword [ebx + 0xc]
add edx, esi
add edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4072f9
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4072f9
push 0x1e
push 8
push 0x414670
push eax
push edi
call fcn.00407340
add esp, 0x14
mov ecx, dword [ebp - 0x20]
add ecx, eax
mov dword [ebp - 0x20], ecx
cmp ecx, 0x1e
jl 0x4072f9
mov dword [ebp - 0x1c], 1
inc dword [ebp - 0x30]
add ebx, 0x28
mov dword [ebp - 0x28], ebx
xor edi, edi
mov eax, dword [ebp - 0x2c]
jmp 0x407218
add esi, 0x1000
jmp 0x40728c
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x408060
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
xor ecx, ecx
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
ret
Function at 0x401000
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x41fa0d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, ecx
push fcn.00417480
push 0x401210
push 5
lea eax, [esi + 0x1f38]
push 4
push eax
mov dword [esp + 0x34], esi
call fcn.00408d60
mov ecx, dword [0x4285cc]
lea edi, [esi + 0x1f4c]
mov dword [esp + 0x22c], 0
mov dword [edi], ecx
mov edx, dword [0x4285cc]
lea ebx, [esi + 0x1f50]
mov dword [ebx], edx
lea eax, [esp + 0x124]
mov byte [esp + 0x22c], 2
push eax
push 0xff
mov dword [esi], 0x4217c4
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetLocalTime]
mov edx, dword [esp + 0x1a]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x16]
and edx, 0xffff
push edx
mov edx, dword [esp + 0x18]
and eax, 0xffff
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x14]
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x1a]
push edx
mov edx, dword [esp + 0x22]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [esp + 0x40]
push str._02d_02d_04d__02d_02d_02d_03d.BMP
push eax
call fcn.00408d0e
add esp, 0x24
lea ecx, [esp + 0x124]
push ecx
mov ecx, edi
call fcn.004175bd
lea edx, [esp + 0x24]
mov ecx, edi
push edx
call fcn.0041779c
mov eax, dword [esp + 0x1a]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x16]
and eax, 0xffff
and ecx, 0xffff
push eax
mov eax, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x14]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x1a]
and ecx, 0xffff
push eax
push ecx
mov eax, dword [esp + 0x26]
and edx, 0xffff
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0x40]
push str._02d_02d_04d__02d_02d_02d_03d.JPG
push ecx
call fcn.00408d0e
add esp, 0x24
lea edx, [esp + 0x124]
mov ecx, ebx
push edx
call fcn.004175bd
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
call fcn.0041779c
push 0
push 0
push 1
push 0
mov dword [esi + 0x1f58], 0
call dword [sym.imp.KERNEL32.DLL_CreateEventA]
push 0x1f2c
mov dword [esi + 0x1f54], eax
call fcn.00417928
mov ecx, dword [esp + 0x23c]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x238]
add esp, 4
test eax, eax
mov dword [esi + 0x1f5c], eax
mov dword [esi + 0x1f60], ecx
mov dword [esi + 0x1f64], 0x3c
mov dword [esi + 8], 0
je 0x4011e5
push ecx
mov ecx, esi
call fcn.00403590
mov ecx, dword [esp + 0x224]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x224
ret 8
Function at 0x401240
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x41fa54
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esi], 0x4217c4
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], 2
test ecx, ecx
je 0x401282
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x1f4c]
mov ebx, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
lea edi, [esi + 0x1f4c]
push eax
call ebx
mov eax, dword [esi + 0x1f50]
lea ebp, [esi + 0x1f50]
push eax
call ebx
mov ecx, ebp
mov byte [esp + 0x1c], 1
call fcn.00417480
mov ecx, edi
mov byte [esp + 0x1c], 0
call fcn.00417480
push fcn.00417480
push 5
add esi, 0x1f38
push 4
push esi
mov dword [esp + 0x2c], 0xffffffff
call fcn.00408c1a
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x403390
Capabilities:
Capture webcam image

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1f54]
push eax
call dword [sym.imp.KERNEL32.DLL_ResetEvent]
push 0
push 0
push 0
push 0
push esi
push 0x4034f0
call fcn.00417a9f
mov eax, dword [esi + 0x1f58]
test eax, eax
jne 0x4033d9
push 0
push 0
push 1
push 1
push 0
push 0
push 0
push 0
call sub.AVICAP32.dll_capCreateCaptureWindowA
mov dword [esi + 0x1f58], eax
mov ecx, dword [esi + 0x1f58]
push ebx
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
push ecx
call ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40345c
mov edx, dword [esi + 0x1f58]
push 0
push 0
push 0x40a
push edx
call edi
test eax, eax
je 0x40345c
mov eax, dword [esi + 0x1f58]
push eax
call ebx
test eax, eax
je 0x403428
mov ecx, dword [esi + 0x1f58]
push 0
push 0
push 0x43d
push ecx
call edi
mov edx, dword [esi + 0x1f58]
push edx
call ebx
test eax, eax
je 0x403451
lea ecx, [esi + 0x1f4c]
call fcn.00417872
push eax
mov eax, dword [esi + 0x1f58]
push 0
push 0x419
push eax
call edi
lea ecx, [esi + 0x1f4c]
call fcn.00417884
mov ecx, dword [esi + 0x1f58]
push ecx
call ebx
test eax, eax
pop ebx
je 0x403492
mov edx, dword [esi + 0x1f58]
push 0
push 0
push 0x40b
push edx
call edi
mov edi, eax
mov eax, dword [esi + 0x1f54]
push eax
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov eax, edi
pop edi
pop esi
ret 4
mov eax, dword [esi + 0x1f54]
xor edi, edi
push eax
call dword [sym.imp.KERNEL32.DLL_SetEvent]
mov eax, edi
pop edi
pop esi
ret 4
Function at 0x403710
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
sub esp, 0x304
push ebx
push ebp
push esi
mov esi, dword [esp + 0x314]
mov ebp, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp], 0x421858
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call fcn.00417928
mov ebx, dword [esp + 0x320]
mov dword [0x429ee0], eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call fcn.00417928
mov dword [0x429ee4], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [0x429ee0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x429ee0]
push ecx
call fcn.004166cb
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x429ee4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x429ee4]
push eax
call fcn.004166cb
mov ecx, dword [esp + 0x330]
add esp, 0x10
lea edx, [esp + 0x114]
xor ebx, ebx
push 0xff
push edx
mov dword [0x428130], ecx
push ebx
mov dword [ebp + 0xc], ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea eax, [esp + 0x14]
push eax
push 0xff
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x13], bl
lea ecx, [esp + 0x114]
push 0x5c
push ecx
call fcn.004095d0
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x21c]
lea edi, [edx + 1]
mov dword [esp + 0x18], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x21c]
mov byte [edx], bl
push ecx
call fcn.004166cb
add esp, 0xc
push str.flash
call dword [sym.imp.KERNEL32.DLL_GetCommandLineA]
push eax
call fcn.00409550
add esp, 8
lea edx, [esp + 0x14]
push edx
call fcn.00403f70
cmp eax, 0x20
jg 0x403888
mov ecx, ebp
mov dword [ebp + 0xc], 1
call fcn.00403a50
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x304
ret 0xc
Function at 0x403a50
Capabilities:
Get common file path

Disassembly:
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
push esi
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
mov ebx, eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x4039c0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], str.AStuckWnd
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_RegisterClassExA]
push esi
push ebx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x42816c
push str.AStuckWnd
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, esi
mov dword [edi + 4], eax
jne 0x403ad4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], 1
push ecx
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x403b2d
push str.Shell32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x403b2d
push str.SHChangeNotifyRegister
push ebx
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov ecx, dword [edi + 4]
lea edx, [esp + 0xc]
push edx
push 1
push 0x458
push 0x100
push 2
push ecx
call eax
push ebx
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov ecx, dword [edi + 8]
xor eax, eax
cmp ecx, esi
pop edi
pop esi
pop ebx
setne al
add esp, 0x38
ret
Function at 0x405120
Capabilities:
Access peb ldr_data
Get ntdll base address
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x41fcc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0xc]
xor edi, edi
push eax
mov dword [esp + 0x8c], edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esi + 0xc]
push 0x64
push 0x78
push ecx
mov ebx, eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebp, eax
push ebp
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 3
push ebx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0xc]
push 0xcc0020
push edx
push eax
push edi
push edi
push ecx
push 0x64
push 0x78
push edi
push edi
push ebx
call dword [sym.imp.GDI32.dll_StretchBlt]
xor edx, edx
mov ecx, 0xa
mov dword [esp + 0x1c], edx
xor eax, eax
mov dword [esp + 0x20], edx
mov word [esp + 0x22], di
mov dword [esp + 0x24], edx
mov word [esp + 0x24], di
lea edi, [esp + 0x2c]
push eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x58]
push eax
mov ecx, 0xa
lea esi, [esp + 0x34]
lea edi, [esp + 0x5c]
push edx
mov dword [esp + 0x38], 0x28
mov dword [esp + 0x3c], 0x78
mov dword [esp + 0x40], 0x64
mov word [esp + 0x44], 1
mov word [esp + 0x46], 0x18
push 1
push edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.GDI32.dll_GetDIBits]
push ebp
mov word [esp + 0x40], dx
push ebx
mov word [esp + 0x38], 0x4d42
mov dword [esp + 0x3a], 0x8cd6
mov dword [esp + 0x42], 0x36
call edi
mov eax, dword [esp + 0x30]
lea esi, [eax + eax*2]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
imul esi, eax
push esi
call fcn.00417928
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x54]
mov dword [esp + 0x10], eax
push 0
push ecx
push eax
push edx
push 0
push ebp
push ebx
call edi
mov eax, dword [esp + 0x90]
push 0x428108
push eax
call fcn.00409199
mov edi, eax
add esp, 8
test edi, edi
je 0x4052af
push edi
push 1
lea ecx, [esp + 0x24]
push 0xe
push ecx
call fcn.00408de2
push edi
push 1
lea edx, [esp + 0x44]
push 0x28
push edx
call fcn.00408de2
mov eax, dword [esp + 0x30]
push edi
push 1
push esi
push eax
call fcn.00408de2
push edi
call fcn.00408f1b
add esp, 0x34
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00417951
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
lea ecx, [esp + 0x90]
mov dword [esp + 0x88], 0xffffffff
call fcn.00417480
mov ecx, dword [esp + 0x80]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x7c
ret 4
Function at 0x405780
Capabilities:
Initialize winsock library

Disassembly:
push ebx
push esi
mov ebx, ecx
push edi
xor eax, eax
push 0x200
mov dword [ebx + 0x1b8], eax
mov dword [ebx + 0x1c0], eax
mov dword [ebx + 0x1bc], eax
mov dword [ebx + 0x1c4], eax
call fcn.00417928
push 0x100
mov dword [ebx + 0x1b0], eax
call fcn.00417928
mov edx, eax
mov eax, dword [esp + 0x18]
or ecx, 0xffffffff
mov dword [ebx + 0x194], eax
mov edi, str.TheComputerOfTheGhost
xor eax, eax
add esp, 8
mov dword [ebx + 0x1b4], edx
mov dword [ebx + 0x198], ecx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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]
lea ecx, [ebx + 4]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebx], eax
pop edi
mov eax, ebx
pop esi
pop ebx
ret 4

Function at 0x405830
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
push edi
mov esi, ecx
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40584d
pop edi
or eax, 0xffffffff
pop esi
pop ecx
ret 8
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esi + 0x1a0], eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x19e], ax
mov eax, dword [esi + 0x194]
lea edi, [esi + 0x19c]
cmp eax, 0xffffffff
mov word [edi], 2
jne 0x4058a2
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x194], eax
mov eax, dword [esi + 0x194]
cmp eax, 0xffffffff
jne 0x4058b5
pop edi
or eax, eax
pop esi
pop ecx
ret 8
push 0x10
push edi
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4058cc
pop edi
or eax, eax
pop esi
pop ecx
ret 8
mov edx, dword [esi + 0x194]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x1006
push 0xffff
push edx
mov dword [esp + 0x24], 0x7530
call edi
mov ecx, dword [esi + 0x194]
lea eax, [esp + 8]
push 4
push eax
push 0x1005
push 0xffff
push ecx
mov dword [esp + 0x1c], 0x7530
call edi
pop edi
xor eax, eax
pop esi
pop ecx
ret 8
Function at 0x405980
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
or eax, 0xffffffff
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x194], eax
je 0x405ab6
mov ecx, dword [esi + 0x198]
mov ebp, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [esp + 0x10]
mov ebx, 1
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x1c], ebx
call ebp
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [esp + 0x28]
lea edi, [eax + eax*4]
shl edi, 1
cmp edi, ebx
jl 0x405a26
mov edx, dword [esi + 0x198]
push 0
push 0
push edx
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esi + 0x1ac], eax
mov eax, dword [esi + 0x1bc]
test eax, eax
je 0x4059f9
mov ecx, dword [esi + 0x1c4]
push ecx
call eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x405a10
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x405a26
cmp dword [esi + 0x1ac], 0xffffffff
jne 0x405a26
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
inc ebx
cmp ebx, edi
jle 0x4059cf
mov eax, dword [esi + 0x198]
lea edx, [esp + 0x14]
push edx
xor edi, edi
push 0x8004667e
push eax
mov dword [esp + 0x20], edi
call ebp
mov eax, dword [esi + 0x1ac]
cmp eax, 0xffffffff
jne 0x405a56
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x14
ret 4
lea ecx, [esp + 0x18]
mov dword [esi + 0x194], eax
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x24], edi
call ebp
mov eax, dword [esi + 0x194]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [esp + 0x1c]
push 4
push edx
push 0x1006
mov ebx, 0x7530
push 0xffff
push eax
mov dword [esp + 0x30], ebx
call edi
mov edx, dword [esi + 0x194]
lea ecx, [esp + 0x20]
push 4
push ecx
push 0x1005
push 0xffff
push edx
mov dword [esp + 0x34], ebx
call edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
Function at 0x405b80
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x408
mov al, byte [0x429ee8]
push ebx
push esi
mov esi, ecx
push edi
mov byte [esp + 0xc], al
mov ecx, 0x101
xor eax, eax
lea edi, [esp + 0xd]
mov edx, dword [esi + 0x194]
rep stosd dword es:[edi], eax
push 0
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
mov edi, dword [sym.imp.WS2_32.dll_recv]
push 1
push ecx
push edx
call edi
cmp eax, 1
jl 0x405cb6
mov al, byte [esp + 0xc]
mov bl, 0x3e
cmp al, bl
jne 0x405cb6
mov ecx, dword [esi + 0x194]
push 0
lea eax, [esp + 0x11]
push 1
push eax
push ecx
call edi
cmp eax, 1
jl 0x405cb6
cmp byte [esp + 0xd], bl
jne 0x405cb6
mov eax, dword [esi + 0x194]
push 0
lea edx, [esp + 0x12]
push 1
push edx
push eax
call edi
cmp eax, 1
jl 0x405cb6
mov edx, dword [esi + 0x194]
push 0
lea ecx, [esp + 0x13]
push 1
push ecx
push edx
call edi
cmp eax, 1
jl 0x405cb6
movsx ebx, byte [esp + 0xf]
mov eax, dword [esp + 0xe]
shl ebx, 8
and eax, 0xff
add ebx, eax
cmp ebx, 0x400
jg 0x405cb6
lea ecx, [ebx - 4]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004061a0
mov eax, dword [esp + 0x418]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0xc]
mov edi, eax
push 0x428358
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [ebx + eax], 0
lea eax, [esp + 0x14]
push eax
call fcn.00409bb5
push 0x428358
push 0
call fcn.00409bb5
push 0x428358
push 0
call fcn.00409bb5
push eax
call fcn.00409baa
add esp, 0x1c
mov eax, ebx
pop edi
pop esi
pop ebx
add esp, 0x408
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x408
ret 4