joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406800
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x20c
mov eax, dword [0x50db60]
push esi
mov dword [esp + 0x20c], eax
call fcn.0043d6d0
call fcn.0043d6d0
call fcn.0043d3f0
movsx eax, al
push eax
call fcn.0043d2e0
movsx ecx, al
push ecx
push str.RylGameServer
push str._s_02d_02d
lea edx, [esp + 0x14]
push 0x103
push edx
call fcn.004be7bb
add esp, 0x18
lea eax, [esp + 4]
push eax
push 1
push 0
mov byte [esp + 0x113], 0
call dword [sym.imp.kernel32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xb7
jne 0x406896
push str.GameServer_already_operating_now._please_shutdown_and_restart
push 0x3f
push 0x500880
push str.WinMain
push 5
push 0x50ef58
call fcn.00408780
add esp, 0x18
jmp 0x406934
push edi
push 0x4066d0
call fcn.004bf6d8
add esp, 4
push 7
call fcn.0040dbf0
mov ecx, eax
call fcn.0040da90
call fcn.0040dbf0
mov dword [eax + 0x40], 0x406790
call fcn.0040dbf0
mov dword [eax + 0x10648], 2
call fcn.00404a30
mov edi, eax
call fcn.0043d6d0
call fcn.0043d6d0
call fcn.0043d3f0
movsx ecx, al
push ecx
call fcn.0043d2e0
movsx edx, al
push edx
lea eax, [esp + 0x114]
push str.RylGameServer_Zone__d_Channel__d
push eax
call fcn.004bf371
mov ecx, dword [esp + 0x230]
mov eax, dword [esp + 0x228]
add esp, 0x10
push 0x65
push 0x6f
push ecx
lea edx, [esp + 0x118]
push edx
push eax
mov ecx, edi
call fcn.00414450
test al, al
je 0x406933
mov ecx, edi
call fcn.00414570
pop edi
test esi, esi
je 0x40693f
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, dword [esp + 0x20c]
xor eax, eax
pop esi
call fcn.004bff5b
add esp, 0x20c
ret 0x10

Function at 0x407c30
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4d3469
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
mov dword [esi], 0x500dfc
push 0xffffffffffffffff
push esi
mov dword [esp + 0x20], 3
call fcn.0040de10
mov eax, dword [esi + 0x30]
add esp, 8
cmp eax, 0xffffffff
je 0x407c7e
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi + 0x30], 0xffffffff
mov eax, dword [esi + 0x28]
mov edi, dword [sym.imp.kernel32.dll_CloseHandle]
xor ebx, ebx
cmp eax, ebx
je 0x407c93
push eax
call edi
mov dword [esi + 0x28], ebx
mov eax, dword [esi + 0x2c]
cmp eax, ebx
je 0x407ca0
push eax
call edi
mov dword [esi + 0x2c], ebx
lea edi, [esi + 0x38]
mov ecx, edi
call fcn.0040e1a0
lea ebx, [esi + 0x50]
mov ecx, ebx
call fcn.0040a030
mov ecx, ebx
mov byte [esp + 0x18], 2
call fcn.0040a0f0
mov ecx, edi
mov byte [esp + 0x18], 1
call fcn.0040e270
lea eax, [esi + 8]
push eax
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov ecx, dword [esp + 0x10]
pop edi
mov dword [esi], 0x500df0
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x407f00
Capabilities:
Receive data
Receive data on socket

Disassembly:
push 0xffffffffffffffff
push 0x4d3550
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov eax, dword [0x50db60]
push ebx
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x40], eax
call fcn.0040e0d0
xor ebx, ebx
mov dword [esp + 0x4c], ebx
xor eax, eax
push ebx
mov dword [esp + 0x34], eax
push ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x48], eax
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x20]
push eax
mov eax, dword [esi + 0x30]
lea ecx, [esp + 0x1c]
push ecx
push 1
lea edx, [esp + 0x70]
push edx
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
jne 0x407fcd
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
cmp eax, 0x2733
je 0x407fcd
call edi
push eax
push str.UDPWish_Error._WSARecvFrom_error_:__d
push 0xb9
push str.D:WorkRYLSource_v.538_
push str.CUDPWish::ReceivePacket
push 5
push 0x50ef58
call fcn.00408780
add esp, 0x1c
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040e270
xor al, al
jmp 0x408059
mov edx, dword [esp + 0x58]
lea ecx, [esp + 8]
push ecx
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esi + 0x50]
push ecx
call fcn.004228e0
add esp, 0x10
cmp eax, ebx
jne 0x408046
push ebp
lea ecx, [esp + 0x18]
call fcn.0040e160
mov ebp, eax
cmp ebp, ebx
je 0x408036
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x38]
push eax
lea ecx, [ebp + 0x18]
call fcn.0040dd50
lea edi, [esi + 8]
push edi
mov dword [esp + 0x34], edi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
push ebx
push ebp
lea ecx, [esi + 0x38]
mov byte [esp + 0x58], 1
call fcn.0040e0f0
push edi
mov byte [esp + 0x54], bl
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
cmp dword [esp + 0x24], ebx
pop ebp
je 0x408046
lea ecx, [esp + 0x14]
call fcn.0040e1a0
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call fcn.0040e270
mov al, 1
mov ecx, dword [esp + 0x44]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x3c]
pop ebx
call fcn.004bff5b
add esp, 0x48
ret 8
Function at 0x408490
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
sub esp, 0x21c
mov eax, dword [0x50db60]
push ebx
mov ebx, dword [sym.imp.kernel32.dll_GetFileAttributesA]
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x130]
push esi
mov dword [esp + 0x228], eax
call ebx
cmp eax, 0xffffffff
jne 0x4084cc
push 0
push esi
call dword [sym.imp.kernel32.dll_CreateDirectoryA]
test eax, eax
je 0x408572
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.kernel32.dll_GetLocalTime]
movzx ecx, word [esp + 0x18]
movzx edx, word [esp + 0x16]
movzx eax, word [esp + 0x14]
push ecx
movzx ecx, word [esp + 0x16]
push edx
movzx edx, word [esp + 0x16]
push eax
movzx eax, word [esp + 0x18]
push ecx
push edx
push eax
add edi, 0x2c
push edi
push str._s_04d__02d__02d__02d__02d__02d_
lea ecx, [esp + 0x140]
push 0x104
push ecx
call fcn.004be7bb
xor edi, edi
push edi
lea edx, [esp + 0x14c]
push edx
push esi
push str._s__s_04d.log
lea eax, [esp + 0x54]
push 0x104
push eax
call fcn.004be7bb
add esp, 0x40
test eax, eax
jl 0x408572
lea ecx, [ecx]
lea ecx, [esp + 0x1c]
push ecx
call ebx
cmp eax, 0xffffffff
je 0x40858b
inc edi
push edi
lea edx, [esp + 0x124]
push edx
push esi
push str._s__s_04d.log
lea eax, [esp + 0x2c]
push 0x104
push eax
call fcn.004be7bb
add esp, 0x18
test eax, eax
jge 0x408540
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x218]
call fcn.004bff5b
add esp, 0x21c
ret
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ecx, dword [esp + 0x224]
pop edi
pop esi
pop ebx
call fcn.004bff5b
add esp, 0x21c
ret

Function at 0x4085c0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, ecx
cmp dword [esi + 0x1c], 0xffffffff
mov dword [esp + 4], 0
jne 0x4085da
call fcn.00408490
mov dword [esi + 0x1c], eax
mov ecx, dword [esi + 0x24]
mov edx, dword [esi + 0x234]
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
push eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 4]
add edx, ecx
mov eax, edx
cmp eax, 0x6400000
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], 0
jbe 0x40862d
mov edx, dword [esi + 0x1c]
push edx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, esi
call fcn.00408490
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], 0
pop esi
pop ecx
ret
Function at 0x409660
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4ceef8
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push ebp
push esi
mov esi, dword [esp + 0x84]
movzx eax, byte [esi]
push edi
xor edi, edi
test eax, eax
mov ebx, ecx
mov ecx, esi
je 0x4096a0
imul edi, edi, 0x1003f
inc ecx
add edi, eax
movzx eax, byte [ecx]
test eax, eax
jne 0x409690
push ebx
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
fld qword [esp + 0x8c]
fdiv qword [ebx + 0x28]
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0x1c]
lea ecx, [ebx + 0x30]
push edx
mov dword [esp + 0x88], 0
fstp qword [esp + 0x94]
call fcn.00408c90
mov ebp, dword [esp + 0x18]
cmp ebp, dword [esp + 0x1c]
je 0x40974b
jmp 0x4096f0
mov esi, dword [ebp + 0x38]
mov eax, dword [esp + 0x88]
lea ebx, [ebx]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x409724
test cl, cl
je 0x409720
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x409724
add eax, 2
add esi, 2
test cl, cl
jne 0x409700
xor eax, eax
jmp 0x409729
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4097b2
lea ecx, [esp + 0x18]
call fcn.00408aa0
mov ebp, dword [esp + 0x18]
cmp ebp, dword [esp + 0x1c]
jne 0x4096f0
mov esi, dword [esp + 0x88]
fld qword [esp + 0x8c]
mov dword [esp + 0x48], edi
mov dword [esp + 0x38], edi
fst qword [esp + 0x20]
mov dword [esp + 0x40], esi
fst qword [esp + 0x28]
mov ecx, 0xa
fstp qword [esp + 0x30]
lea esi, [esp + 0x20]
lea edi, [esp + 0x50]
lea eax, [esp + 0x48]
mov dword [esp + 0x3c], 1
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [esp + 0x90]
push ecx
lea ecx, [ebx + 0x30]
call fcn.00409510
push ebx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x74
ret 0xc
fld qword [esp + 0x8c]
fld st(0)
fadd qword [ebp + 0x18]
fstp qword [ebp + 0x18]
fcom qword [ebp + 0x20]
fnstsw ax
test ah, 5
jp 0x4097ce
fst qword [ebp + 0x20]
fcom qword [ebp + 0x28]
fnstsw ax
test ah, 0x41
jne 0x4097e4
mov ecx, dword [ebp + 0x34]
fstp qword [ebp + 0x28]
inc ecx
mov dword [ebp + 0x34], ecx
jmp 0x409796
mov ecx, dword [ebp + 0x34]
fstp st(0)
inc ecx
mov dword [ebp + 0x34], ecx
jmp 0x409796
Function at 0x4097f0
Capabilities:
Access peb ldr_data
Execute anti-debugging instructions
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4cef18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
push edi
push esi
mov dword [esp + 0x10], esi
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
lea edi, [esi + 0x30]
xor ebx, ebx
mov ecx, edi
mov dword [esp + 0x24], ebx
call fcn.00408c00
mov dword [edi + 4], eax
mov byte [eax + 0x41], 1
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov dword [edi + 8], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
rdtsc
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
push 0x3e8
call dword [sym.imp.kernel32.dll_Sleep]
rdtsc
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
sub eax, edi
sbb ecx, edx
sub eax, 0x39
sbb ecx, ebx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
fild qword [esi + 0x20]
mov ecx, dword [esp + 0x1c]
pop edi
fstp qword [esi + 0x28]
mov eax, esi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret

Function at 0x40a6d0
Capabilities:
Connect socket

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x18]
mov eax, dword [0x50db60]
push edi
mov edi, ecx
mov ecx, dword [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0xc]
test al, al
jne 0x40a70c
or eax, 0xffffffff
pop edi
mov ecx, dword [esp + 0x10]
call fcn.004bff5b
add esp, 0x14
ret 8
mov edx, dword [edi]
push esi
mov ecx, edi
call dword [edx + 4]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a73a
mov eax, dword [edi + 0x10]
push eax
lea ecx, [esp + 0xc]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40a73a
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
mov ecx, dword [esp + 0x18]
mov eax, esi
pop esi
pop edi
call fcn.004bff5b
add esp, 0x14
ret 8

Function at 0x40a750
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
mov edx, dword [esp + 0x18]
mov eax, dword [0x50db60]
push edi
mov edi, ecx
mov ecx, dword [esp + 0x20]
push ecx
push edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0xc]
test al, al
jne 0x40a78c
or eax, 0xffffffff
pop edi
mov ecx, dword [esp + 0x10]
call fcn.004bff5b
add esp, 0x14
ret 8
mov edx, dword [edi]
push esi
mov ecx, edi
call dword [edx + 4]
mov esi, eax
cmp esi, 0xffffffff
je 0x40a7dc
push 4
lea eax, [esp + 0x28]
push eax
push 4
push 0xffff
push esi
mov dword [esp + 0x38], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x40a7d2
mov ecx, dword [edi + 0x10]
push ecx
lea edx, [esp + 0xc]
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40a7dc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
mov ecx, dword [esp + 0x18]
mov eax, esi
pop esi
pop edi
call fcn.004bff5b
add esp, 0x14
ret 8
Function at 0x40a8c0
Capabilities:
Get hostname
Resolve dns

Disassembly:
sub esp, 0x108
mov eax, dword [0x50db60]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x114], eax
push 0xff
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x40a97f
lea ecx, [esp + 0x14]
push ecx
mov byte [esp + 0x117], al
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
mov dword [esp + 0x10], eax
je 0x40a97f
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
xor esi, esi
test ecx, ecx
je 0x40a97f
mov edi, dword [esp + 0x11c]
mov ebp, dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, dword [eax + esi*4]
mov eax, dword [esp + 0x120]
mov ebx, dword [edx]
dec eax
push eax
push ebx
call ebp
push eax
push edi
call fcn.004bf010
mov eax, dword [esp + 0x12c]
add esp, 0xc
cmp bl, 0xa
mov byte [edi + eax - 1], 0
je 0x40a967
cmp bl, 0xac
jne 0x40a95d
cmp bh, 0x10
jb 0x40a97b
cmp bh, 0x1f
ja 0x40a97b
jmp 0x40a967
cmp bl, 0xc0
jne 0x40a97b
cmp bh, 0xa8
jne 0x40a97b
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0xc]
mov ecx, dword [eax + esi*4 + 4]
inc esi
test ecx, ecx
jne 0x40a920
test esi, esi
je 0x40a97f
mov al, 1
jmp 0x40a981
xor al, al
mov ecx, dword [esp + 0x114]
pop edi
pop esi
pop ebp
pop ebx
call fcn.004bff5b
add esp, 0x108
ret 8

Function at 0x40aa50
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
lea eax, [esp]
push eax
call dword [sym.imp.kernel32.dll_GetSystemInfo]
mov eax, dword [esp + 0x14]
add eax, eax
add esp, 0x24
ret
Function at 0x40b7b0
Capabilities:
Initialize winsock library

Disassembly:
push 0xffffffffffffffff
push 0x4cf108
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x19c
mov eax, dword [0x50db60]
push ebx
push esi
push edi
mov edi, ecx
push edi
mov dword [esp + 0x1a8], eax
mov dword [esp + 0x14], edi
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
push 0x53d254
xor ebx, ebx
push 0x10
mov dword [esp + 0x1b8], ebx
call fcn.004bf333
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x1b0], 1
je 0x40b818
mov ecx, eax
call fcn.00410290
jmp 0x40b81a
xor eax, eax
push 0x53d254
push 0x21c
mov dword [edi + 0x20], eax
call fcn.004bf333
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x1b0], 2
je 0x40b848
mov ecx, eax
call fcn.0040de60
jmp 0x40b84a
xor eax, eax
push 0x53d254
push 0x8c
mov dword [edi + 0x24], eax
call fcn.004bf333
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, ebx
mov byte [esp + 0x1b0], 3
je 0x40b878
mov ecx, eax
call fcn.0040fc60
jmp 0x40b87a
xor eax, eax
lea esi, [edi + 0x2c]
mov ecx, esi
mov byte [esp + 0x1b0], bl
mov dword [edi + 0x28], eax
call fcn.004412e0
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
lea esi, [edi + 0x38]
mov ecx, esi
mov byte [esp + 0x1b0], 4
call fcn.0046c6c0
mov dword [esi + 4], eax
mov byte [eax + 0x15], 1
mov eax, dword [esi + 4]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
mov dword [eax], eax
mov eax, dword [esi + 4]
mov dword [eax + 8], eax
lea eax, [esp + 0x14]
push eax
mov dword [esi + 8], ebx
push 0x202
mov dword [edi + 0x44], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [esp + 0x1a8]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x19c]
pop ebx
call fcn.004bff5b
add esp, 0x1a8
ret
Function at 0x40c500
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x20
push ebx
mov ebx, dword [esp + 0x28]
push 0x1c
lea eax, [esp + 0xc]
push eax
push ebx
call dword [sym.imp.kernel32.dll_VirtualQuery]
test eax, eax
jne 0x40c51f
pop ebx
add esp, 0x20
ret
push esi
mov esi, dword [esp + 0x10]
test esi, esi
jne 0x40c530
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
push ecx
push edx
push esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
je 0x40c528
mov ecx, dword [esi + 0x3c]
movzx eax, word [ecx + esi + 0x14]
add ecx, esi
push ebp
push edi
lea edi, [eax + ecx + 0x18]
movzx ecx, word [ecx + 6]
mov eax, esi
cdq
mov esi, eax
mov ebp, edx
mov eax, ebx
cdq
sub eax, esi
sbb edx, ebp
xor ebp, ebp
test ecx, ecx
mov dword [esp + 0x10], ecx
jbe 0x40c5a9
lea ebx, [edi + 0x10]
mov ecx, dword [ebx]
mov esi, dword [ebx - 8]
cmp ecx, esi
mov edi, dword [ebx - 4]
ja 0x40c582
mov ecx, esi
xor esi, esi
cmp edx, esi
jb 0x40c59d
ja 0x40c58e
cmp eax, edi
jb 0x40c59d
lea esi, [ecx + edi]
xor ecx, ecx
cmp edx, ecx
jb 0x40c5b3
ja 0x40c59d
cmp eax, esi
jbe 0x40c5b3
mov ecx, dword [esp + 0x10]
inc ebp
add ebx, 0x28
cmp ebp, ecx
jb 0x40c574
pop edi
pop ebp
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
inc ebp
sub eax, edi
pop edi
mov dword [ecx], ebp
pop ebp
pop esi
mov dword [edx], eax
mov eax, 1
pop ebx
add esp, 0x20
ret
Function at 0x40cac0
Capabilities:
Get hostname
Get session user name

Disassembly:
sub esp, 0x938
mov eax, dword [0x50db60]
push esi
mov esi, dword [sym.imp.kernel32.dll_GetModuleFileNameA]
mov dword [esp + 0x938], eax
push 0x104
lea eax, [esp + 0x18]
push eax
push 0
mov dword [esp + 0x18], 0x104
mov dword [esp + 0x1c], 0x104
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
call esi
lea ecx, [esp + 0x14]
push 0x2e
push ecx
call fcn.004c0381
add esp, 8
test eax, eax
je 0x40cb1d
mov byte [eax], 0
lea edx, [esp + 0x62c]
push edx
lea eax, [esp + 0x324]
push eax
lea ecx, [esp + 0x738]
push ecx
lea edx, [esp + 0x840]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.004c03ec
push 0x104
lea ecx, [esp + 0x338]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.004c02ee
add esp, 0x20
push 0x104
lea eax, [esp + 0x220]
push eax
push 0
call esi
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x428]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x52c]
push ecx
call dword [sym.imp.kernel32.dll_GetComputerNameA]
mov esi, dword [esp + 0x948]
lea edx, [esp + 4]
push edx
mov edx, dword [esi + 0xc]
lea eax, [esp + 0xc]
push eax
push 0x104
lea ecx, [esp + 0x124]
push ecx
push edx
call fcn.0040c500
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0xc]
add esp, 0x14
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call fcn.0040c270
mov ecx, dword [esi]
add esp, 4
push eax
push ecx
lea edx, [esp + 0x12c]
push edx
lea eax, [esp + 0x540]
push eax
lea ecx, [esp + 0x440]
push ecx
mov ecx, dword [esp + 0x964]
lea edx, [esp + 0x23c]
push edx
mov edx, dword [esp + 0x964]
lea eax, [esp + 0x38]
push eax
push str._______________________________________________________________________________r_n____Basic_Information_r_n_______________________________________________________________________________r_n_r_nProgram_Name_:__s_r_nEXE__________:__s_r_nUser_________:__s_r_nComputer_____:__s_r_n_r_nProgram______:__s_r_nException____:__08x___s__r_nFault_Address:__08x__02X:_08x_r_n_r_n_r_n
push ecx
push edx
call fcn.004be7bb
mov ecx, dword [esp + 0x96c]
add esp, 0x34
pop esi
call fcn.004bff5b
add esp, 0x938
ret

Function at 0x40e610
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4cf2b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
push edi
push esi
mov dword [esp + 0xc], esi
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x30]
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x24]
push eax
push edi
push ecx
push esi
push str.SP:0x_p_DP:0x_p_IP:_15s__InternalCloseSocket___SessionClose_Called_:__d
push 0x125
push 0x4d63f8
push str.CSession::CloseSession
push 3
push 0x50f190
call fcn.00408780
add esp, 0x28
mov ecx, esi
call fcn.0040e470
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x40e6a0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov eax, dword [esi + 0x70]
xor ebx, ebx
cmp eax, ebx
je 0x40e6ef
mov eax, dword [esi + 0x30]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push ecx
push eax
push edx
push esi
push str.SP:0x_p_DP:0x_p_IP:_15s_SOCKET:0x_p__Recv_pending_now
push 0x18c
push 0x4d63f8
push str.CSession::InternalRecv
push 3
push 0x50f190
call fcn.00408780
add esp, 0x28
pop esi
mov al, 1
pop ebx
add esp, 0x10
ret
mov eax, dword [esi + 0x54]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov ecx, dword [eax + 8]
mov dword [esp + 0x14], ecx
mov edx, dword [eax + 0xc]
mov ecx, dword [eax]
push ebp
push edi
sub edx, dword [eax + 8]
add edx, ecx
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x18], edx
mov ecx, dword [ecx + 0xc]
mov edx, dword [ecx]
push eax
push esi
call dword [edx + 8]
mov edi, eax
cmp edi, ebx
je 0x40e75d
push ebx
lea eax, [edi + 4]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi + 0x28]
lea edx, [esp + 0x20]
push edx
push 1
lea eax, [esp + 0x2c]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
jne 0x40e7bf
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x40e7bf
mov ebp, str.SP:0x_p_DP:0x_p_IP:_15s_SOCKET:0x_p_InternalCloseSocket___WSARecv_Error___ErrorCode:_d
jmp 0x40e762
mov ebp, str.SP:0x_p_DP:0x_p_IP:_15s_SOCKET:0x_p_InternalCloseSocket___WSARecv_Error___Create_RecvOverlapped_Failed___ErrorCode:_d
cmp ebp, ebx
je 0x40e7bf
mov edx, dword [esi + 0x30]
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ebx, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x28]
push eax
push ebx
push ecx
push esi
push ebp
push 0x1b1
push 0x4d63f8
push str.CSession::InternalRecv
push 3
push 0x50f190
call fcn.00408780
add esp, 0x2c
mov ecx, esi
call fcn.0040e470
mov edx, dword [esi + 0x20]
mov ecx, dword [edx + 0xc]
mov eax, dword [ecx]
push edi
call dword [eax + 0x10]
pop edi
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0x10
ret
mov eax, dword [esi + 0x70]
pop edi
inc eax
pop ebp
mov dword [esi + 0x70], eax
pop esi
mov al, 1
pop ebx
add esp, 0x10
ret