joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405a90
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov eax, 0x155c
call fcn.00410b70
push ebx
push esi
mov esi, dword [esp + 0x1568]
mov ebx, ecx
push edi
mov ecx, 0x514
xor eax, eax
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
mov eax, 0x431bde83
mov ecx, dword [ebx + 0x1a6c]
mul esi
shr edx, 0x12
mov dword [esp + 0xc], edx
mov eax, esi
xor edx, edx
mov esi, 0xf4240
div esi
lea eax, [esp + 0xc]
mov dword [esp + 0x18], ecx
push eax
push 0
push 0
inc ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x20]
push edx
push ecx
call sub.WS2_32.dll_select
test eax, eax
jge 0x405b31
mov ecx, dword [0x41a980]
mov eax, dword [0x41a920]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x1a9c], 3
pop esi
pop ebx
add esp, 0x155c
ret 4
je 0x405c5e
mov ecx, dword [ebx + 0x1a6c]
lea eax, [esp + 0x14]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x405c5e
mov eax, dword [ebx + 0x1a6c]
push 0
push 0
push 0
lea edx, [esp + 0x124]
push 0x1450
push edx
push eax
call sub.WS2_32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x405b83
mov ecx, dword [0x41a91c]
push 0x10
push str.KHSimulator_Message
jmp 0x405b94
test eax, eax
jne 0x405bbb
mov ecx, dword [0x41a924]
push 0x10
push str.KHSimulator_Message
mov edx, dword [0x41a980]
push ecx
mov eax, dword [edx + 0x20]
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x1a9c], 1
pop esi
pop ebx
add esp, 0x155c
ret 4
jle 0x405bda
mov ecx, eax
lea edi, [ebx + 0x3278]
mov edx, ecx
lea esi, [esp + 0x118]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx + 0x327a]
mov ecx, ebx
push eax
call fcn.00406150
mov esi, eax
test si, si
jne 0x405bf4
mov esi, 1
lea ecx, [esi - 1]
lea edx, [ebx + 0x3278]
push ecx
push edx
mov ecx, ebx
call fcn.004060f0
and esi, 0xffff
cmp al, byte [esi + ebx + 0x3277]
je 0x405c48
mov ecx, dword [0x41a980]
mov eax, dword [0x41a928]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov dword [ebx + 0x1a9c], 4
pop esi
pop ebx
add esp, 0x155c
ret 4
pop edi
mov dword [ebx + 0x1a9c], 0
pop esi
pop ebx
add esp, 0x155c
ret 4
pop edi
mov dword [ebx + 0x1a9c], 2
pop esi
pop ebx
add esp, 0x155c
ret 4
Function at 0x405ed0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push esi
xor eax, eax
push edi
xor edi, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
push edi
push edi
mov dword [esp + 0x24], eax
push 1
mov esi, ecx
push edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x405f21
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x1a9c], 1
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov eax, dword [esi + 0x1a94]
lea ecx, [esp + 0x10]
lea edx, [esp + 0xc]
push ecx
lea ebx, [esi + 0x3278]
push edx
push 0x1f4
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406049
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x405f60
mov ecx, dword [esp + 0x20]
push ecx
jmp 0x405f08
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, edi
je 0x405f9d
cmp eax, 0x102
jne 0x406049
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x1a9c], 2
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov ecx, dword [esi + 0x1a94]
lea edx, [esp + 0xc]
push 1
lea eax, [esp + 0x14]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x405fc4
mov edx, dword [esp + 0x20]
push edx
jmp 0x405f08
lea eax, [esi + 0x327a]
mov ecx, esi
push eax
call fcn.00406150
mov edi, eax
test di, di
jne 0x405fde
mov edi, 1
lea ecx, [edi - 1]
push ecx
push ebx
mov ecx, esi
call fcn.004060f0
and edi, 0xffff
cmp al, byte [edi + esi + 0x3277]
je 0x406034
mov eax, dword [0x41a980]
mov edx, dword [0x41a928]
push 0x10
push str.KHSimulator_Message
mov ecx, dword [eax + 0x20]
push edx
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [esp + 0x20]
mov dword [esi + 0x1a9c], 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4
mov edx, dword [esp + 0x20]
mov dword [esi + 0x1a9c], 0
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x18
ret 4

Function at 0x406060
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ebx
mov ebx, ecx
push ebp
push esi
mov esi, dword [ebx + 0x1acc]
push edi
push 1
push esi
xor ebp, ebp
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov edi, eax
test edi, edi
push ebp
jne 0x406092
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebx + 0x1ac0]
mov ebx, dword [esp + 0x18]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push esi
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov al, byte [ebx + 0xc]
add esp, 0x1c
test al, 0x20
je 0x4060bd
xor ebp, ebp
jmp 0x4060cf
xor eax, eax
test esi, esi
jle 0x4060cf
xor ecx, ecx
mov cl, byte [eax + edi]
add ebp, ecx
inc eax
cmp eax, esi
jl 0x4060c3
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
push 0
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret 4
Function at 0x407d00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x208
push ebx
push esi
mov ebx, ecx
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0xc]
lea esi, [ebx + 0x4bc4]
push ecx
mov ecx, esi
call sub.MFC42u.DLL_CString::operator_2
mov ecx, esi
call sub.MFC42u.DLL_CString::MakeLower
push str.khsimulator.exe
mov ecx, esi
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x407da8
push str.TempComm.dat
push str.khsimulator.exe
mov ecx, esi
call sub.MFC42u.DLL_CString::Replace
mov esi, dword [esi]
push 0x41a0f8
push esi
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x407da8
push esi
push 0x10
add ebx, 0x1cac
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop edi
pop esi
pop ebx
add esp, 0x208
ret
Function at 0x407e70
Capabilities:
Delete directory
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x411a19
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24c
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x264], ebx
call fcn.004106d8
lea eax, [esp + 0x26c]
push str..
lea ecx, [esp + 0x18]
push eax
push ecx
mov byte [esp + 0x270], 1
call sub.MFC42u.DLL_operator_2
mov edx, dword [esp + 0x14]
push ebx
push edx
lea ecx, [esp + 0x28]
mov byte [esp + 0x26c], 2
call sub.MFC42u.DLL_CFileFind::FindFile
cmp eax, ebx
je 0x407fb6
mov ebp, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::FindNextFileW
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], eax
call sub.MFC42u.DLL_CFileFind::IsDots
test eax, eax
jne 0x407fac
mov eax, dword [esp + 0x20]
push 0x10
lea ecx, [esp + 0x24]
call dword [eax + 0x40]
cmp eax, ebx
je 0x407f4d
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov ecx, edi
call fcn.00407e70
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x20]
push edx
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov eax, dword [eax]
push eax
call ebp
lea ecx, [esp + 0x1c]
jmp 0x407fa7
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
call sub.MFC42u.DLL_CFileFind::GetFilePath
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x264], 3
push ecx
call esi
cmp eax, ebx
jne 0x407f9b
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push eax
call sub.MFC42u.DLL_CFile::GetStatus
cmp eax, ebx
je 0x407f9b
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
mov byte [esp + 0x58], bl
call sub.MFC42u.DLL_CFile::SetStatus
mov eax, dword [esp + 0x10]
push eax
call esi
mov byte [esp + 0x264], 2
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString
cmp dword [esp + 0x18], ebx
jne 0x407eed
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CFileFind::Close
lea ecx, [esp + 0x14]
mov byte [esp + 0x264], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x264], bl
call sub.MFC42u.DLL_CFileFind::CFileFind
lea ecx, [esp + 0x26c]
mov dword [esp + 0x264], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x25c]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x258
ret 4
Function at 0x4084e0
Capabilities:
Create directory
Read file on windows
Terminate process
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411af0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
mov eax, dword [esi + 0x1c80]
mov dword [esp + 0x18], ebp
cmp eax, ebp
jbe 0x40866e
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x14], ebp
lea eax, [esp + 0x2c]
mov ecx, esi
push eax
call fcn.00408020
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], ebp
push ecx
lea ecx, [esp + 0x30]
call sub.MFC42u.DLL_CString::operator
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_3
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x1c84]
add edx, ecx
push ebp
push edx
push ebx
mov byte [esp + 0x30], 1
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x18
lea edi, [esi + 0x1d0c]
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esi + 0x1d1c]
add esp, 0x1c
cmp eax, ebp
jne 0x40859e
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
jmp 0x40864c
mov eax, dword [edi]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
lea edx, [esp + 0x18]
push str._sdrv_p_d.dll
push edx
call sub.MFC42u.DLL_CString::Format
mov eax, dword [esp + 0x20]
push 0x41a0f8
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x408689
mov ecx, dword [esi + 0x1d1c]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_calloc]
mov edi, eax
add esp, 8
test edi, edi
je 0x4086b4
mov edx, dword [esi + 0x1d20]
push 0
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esi + 0x1d1c]
push ebx
push eax
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
push ebp
push eax
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x34
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
xor ebp, ebp
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x1c80]
inc eax
add edx, 0x18
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jb 0x40851a
mov dword [esi + 0x1a9c], ebp
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret 4
lea ecx, [esp + 0x10]
mov dword [esi + 0x1a9c], 7
mov byte [esp + 0x24], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
jmp 0x408674
push 1
call dword [sym.imp.MSVCRT.dll_exit]
nop
nop
nop
nop
Function at 0x408e50
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411ba8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
call fcn.00407980
xor edi, edi
mov dword [esp + 0x20], eax
cmp eax, edi
jne 0x408e9a
mov dword [esi + 0x1a9c], 7
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov eax, dword [esi + 0x1e20]
cmp eax, edi
jle 0x40902a
cmp dword [esi + 0x1e24], edi
je 0x40902a
cmp eax, edi
mov dword [esp + 0x18], edi
jle 0x40902a
push ebx
push ebp
mov dword [esp + 0x24], edi
mov eax, dword [esi + 0x1e24]
lea ecx, [eax + edi + 4]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_1
mov edx, dword [esi + 0x1e24]
push 0x41a3c8
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0
mov ebp, dword [edx + edi + 0x24]
mov ebx, dword [edx + edi + 0x28]
lea eax, [edx + edi]
call sub.MFC42u.DLL_CString::Find
test eax, eax
jne 0x408ff5
push str..agl
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x408ff5
add esi, 0x4ba4
push 0x5c
mov ecx, esi
call sub.MFC42u.DLL_CString::ReverseFind
mov edi, eax
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
je 0x408ff1
cmp edi, 0xffffffff
je 0x408ff1
inc edi
lea eax, [esp + 0x18]
push edi
push eax
mov ecx, esi
call sub.MFC42u.DLL_CString::Left
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
mov byte [esp + 0x40], 1
call sub.MFC42u.DLL_operator_1
push ebp
mov byte [esp + 0x38], 2
call sub.MFC42u.DLL_operatornew
mov esi, dword [esp + 0x2c]
push 0
push ebx
push esi
mov edi, eax
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x34]
push 0x41a0f8
push ecx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 0x28
test esi, esi
je 0x408fcc
push esi
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push edi
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 0
call sub.MFC42u.DLL_CString::CString
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
mov dword [esp + 0x34], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esi + 0x1e20]
inc eax
add edi, 0x2c
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
jl 0x408ec6
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x409040
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x411bd8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
call fcn.00407980
xor edi, edi
mov dword [esp + 0x20], eax
cmp eax, edi
jne 0x40908a
mov dword [esi + 0x1a9c], 7
pop edi
pop esi
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
add esp, 0x28
ret
mov eax, dword [esi + 0x1e20]
cmp eax, edi
jle 0x40921a
cmp dword [esi + 0x1e24], edi
je 0x40921a
cmp eax, edi
mov dword [esp + 0x18], edi
jle 0x40921a
push ebx
push ebp
mov dword [esp + 0x24], edi
mov eax, dword [esi + 0x1e24]
lea ecx, [eax + edi + 4]
push ecx
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_1
mov edx, dword [esi + 0x1e24]
push 0x41a3c8
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], 0
mov ebp, dword [edx + edi + 0x24]
mov ebx, dword [edx + edi + 0x28]
lea eax, [edx + edi]
call sub.MFC42u.DLL_CString::Find
test eax, eax
jne 0x4091e5
push str._Json
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::Find
cmp eax, 0xffffffff
je 0x4091e5
add esi, 0x4ba4
push 0x5c
mov ecx, esi
call sub.MFC42u.DLL_CString::ReverseFind
mov edi, eax
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__waccess]
add esp, 8
cmp eax, 0xffffffff
je 0x4091e1
cmp edi, 0xffffffff
je 0x4091e1
inc edi
lea eax, [esp + 0x18]
push edi
push eax
mov ecx, esi
call sub.MFC42u.DLL_CString::Left
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
mov byte [esp + 0x40], 1
call sub.MFC42u.DLL_operator_1
push ebp
mov byte [esp + 0x38], 2
call sub.MFC42u.DLL_operatornew
mov esi, dword [esp + 0x2c]
push 0
push ebx
push esi
mov edi, eax
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x34]
push 0x41a0f8
push ecx
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 0x28
test esi, esi
je 0x4091bc
push esi
push ebp
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
push edi
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x34], 0
call sub.MFC42u.DLL_CString::CString
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
mov dword [esp + 0x34], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esi + 0x1e20]
inc eax
add edi, 0x2c
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
jl 0x4090b6
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x28
ret
Function at 0x40b2b0
Capabilities:
Read file on windows
Terminate process

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push 1
push 0x104
mov dword [esp + 0x14], esi
call dword [sym.imp.MSVCRT.dll_calloc]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x40b2e2
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [esi + 0x4bbc]
push 0x41a144
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40b316
push eax
mov dword [esi + 0x1a9c], 7
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop esi
pop ebp
pop ebx
pop ecx
ret
push edi
push 0
push 0
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x28
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
lea edi, [esi + 0x1d4c]
mov ecx, 0xa
mov esi, ebp
push 0
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x30]
mov eax, dword [esi + 0x1d60]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x14
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
lea eax, [esi + 0x1d74]
mov ecx, 5
mov esi, ebp
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push 0
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0x44
push ebx
push 0x14
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x20]
mov ecx, 5
mov esi, ebp
push 0
lea eax, [edx + 0x1d88]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov eax, dword [eax]
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
push ebx
push 0x14
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [esp + 0x3c]
mov esi, ebp
push ebp
lea edi, [ecx + 0x1d9c]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.MSVCRT.dll_free]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x34
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40be20
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, 1
mov eax, dword [esi + 0x1a68]
mov ecx, dword [esi + 0x1a6c]
xor ebp, ebp
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
je 0x40beb5
dec eax
je 0x40be6a
dec eax
jne 0x40c00b
push 0x4e20
mov ecx, esi
call fcn.00405ed0
jmp 0x40be76
push 0x4e20
mov ecx, esi
call fcn.004055a0
mov esi, dword [esi + 0x1a9c]
cmp esi, ebp
je 0x40c00b
cmp esi, 2
jne 0x40c00b
mov ecx, dword [0x41a980]
mov eax, dword [0x41a92c]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
lea eax, [esp + 0x10]
lea edx, [esp + 0x18]
push eax
push ebp
push ebp
inc ecx
push edx
push ecx
mov dword [esp + 0x24], 0x14
mov dword [esp + 0x28], ebp
call sub.WS2_32.dll_select
test eax, eax
jge 0x40bf0a
mov ecx, dword [0x41a980]
mov eax, dword [0x41a920]
push 0x10
push str.KHSimulator_Message
mov edx, dword [ecx + 0x20]
push eax
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esi + 0x1a9c], 3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
mov ecx, dword [esi + 0x1a6c]
lea eax, [esp + 0x18]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x40bfe4
mov edx, dword [esi + 0x1a6c]
push ebp
push ebp
lea ebx, [esi + 0x3278]
push ebp
push 0x1450
push ebx
push edx
call sub.WS2_32.dll_recvfrom
cmp eax, 0xffffffff
jne 0x40bf51
mov eax, dword [0x41a91c]
push 0x10
push str.KHSimulator_Message
jmp 0x40bf61
cmp eax, ebp
jne 0x40bf83
mov eax, dword [0x41a924]
push 0x10
push str.KHSimulator_Message
mov ecx, dword [0x41a980]
push eax
mov edx, dword [ecx + 0x20]
push edx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esi + 0x1a9c], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
jle 0x40c00b
lea eax, [esi + 0x327a]
mov ecx, esi
push eax
call fcn.00406150
mov edi, eax
cmp di, bp
jne 0x40bfa3
mov edi, 1
lea ecx, [edi - 1]
push ecx
push ebx
mov ecx, esi
call fcn.004060f0
and edi, 0xffff
cmp al, byte [edi + esi + 0x3277]
je 0x40bfd3
mov dword [esi + 0x1a9c], 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
mov dword [esi + 0x1a9c], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
mov dword [esi + 0x1a9c], 2
mov eax, dword [0x41a980]
mov edx, dword [0x41a92c]
push 0x10
mov ecx, dword [eax + 0x20]
push str.KHSimulator_Message
push edx
push ecx
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret
Function at 0x40c680
Capabilities:
Check os version
Enumerate processes
Terminate process
Terminate process by name

Disassembly:
sub esp, 0x54c
push ebx
push ebp
push esi
push edi
xor esi, esi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x356]
mov word [esp + 0x354], si
mov dword [esp + 0x14], 0x114
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40c6c8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54c
ret
test byte [esp + 0x24], 2
je 0x40c6e3
cmp dword [esp + 0x18], 5
jae 0x40c6e3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54c
ret
push esi
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebp, eax
cmp ebp, esi
jne 0x40c6fe
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54c
ret
lea ecx, [esp + 0x128]
mov dword [esp + 0x128], 0x22c
push ecx
push ebp
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x40c7ba
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
lea edx, [esp + 0x14c]
push edx
call ebx
push eax
lea eax, [esp + 0x154]
lea ecx, [esp + 0x35c]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_wcsncpy]
lea edx, [esp + 0x364]
push edx
call ebx
push eax
lea eax, [esp + 0x36c]
push str.KHSimulator.exe
push eax
call dword [sym.imp.MSVCRT.dll_wcsncmp]
add esp, 0x20
test eax, eax
jne 0x40c786
mov eax, dword [esp + 0x140]
test esi, esi
jne 0x40c77a
mov dword [esp + 0x10], eax
inc esi
cmp esi, 1
jle 0x40c786
cmp dword [esp + 0x10], eax
je 0x40c7d1
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x14c]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x354]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x128]
push ecx
push ebp
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40c725
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x54c
ret
push 0
call dword [sym.imp.MSVCRT.dll_exit]
nop
nop
nop
nop
nop
nop
nop