joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403530
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x22c
mov eax, dword [0x417014]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
push esi
push edi
push 0x1c
lea eax, [esp + 0x18]
push eax
push fcn.00403530
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov esi, dword [esp + 0x18]
push 0x418cf8
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str.injectx641.sys
push 0x418cf8
push 0x411bc8
push 0x418cf8
call fcn.0040c3f0
add esp, 0x10
push 0x411bd0
push 0x84
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x4035bb
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x228]
xor ecx, esp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push 0x100
mov esi, eax
lea eax, [esp + 0x134]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x30]
push 0x100
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x10], 0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x134]
push eax
call fcn.00403420
push str.Releasephysx27_netbios.dll
lea eax, [esp + 0x13c]
push eax
lea eax, [esp + 0x40]
push 0x411bc8
push eax
call fcn.0040c3f0
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 0x1c
lea eax, [esp + 0x30]
push 0x411bb4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x40367b
push edi
push ebx
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push edi
call esi
add esp, 0x14
push edi
call esi
add esp, 4
mov ecx, dword [esp + 0x234]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x403c70
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push esi
mov esi, ecx
xor ecx, ecx
nop
mov eax, ecx
shr eax, 1
test cl, 1
je 0x403c8e
xor eax, 0xedb88320
test al, 1
je 0x403c9b
shr eax, 1
xor eax, 0xedb88320
jmp 0x403c9d
shr eax, 1
test al, 1
je 0x403caa
shr eax, 1
xor eax, 0xedb88320
jmp 0x403cac
shr eax, 1
test al, 1
je 0x403cb9
shr eax, 1
xor eax, 0xedb88320
jmp 0x403cbb
shr eax, 1
test al, 1
je 0x403cc8
shr eax, 1
xor eax, 0xedb88320
jmp 0x403cca
shr eax, 1
test al, 1
je 0x403cd7
shr eax, 1
xor eax, 0xedb88320
jmp 0x403cd9
shr eax, 1
test al, 1
je 0x403ce6
shr eax, 1
xor eax, 0xedb88320
jmp 0x403ce8
shr eax, 1
test al, 1
je 0x403cf5
shr eax, 1
xor eax, 0xedb88320
jmp 0x403cf7
shr eax, 1
mov dword [ebp + ecx*4 - 0x400], eax
inc ecx
cmp ecx, 0x100
jb 0x403c80
or ecx, 0xffffffff
test edx, edx
je 0x403d2c
movzx eax, byte [esi]
lea esi, [esi + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [ebp + eax*4 - 0x400]
sub edx, 1
jne 0x403d12
not ecx
mov eax, ecx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x403d40
Capabilities:
Get mac address on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
push edi
push 0x288
mov dword [ebp - 8], 0x288
call esi
mov edi, eax
add esp, 4
test edi, edi
jne 0x403d84
pop edi
mov eax, 0x411c80
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.IPHLPAPI.DLL_GetAdaptersInfo]
lea eax, [ebp - 8]
push eax
push edi
call ebx
cmp eax, 0x6f
jne 0x403dac
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push dword [ebp - 8]
call esi
mov edi, eax
add esp, 8
test edi, edi
je 0x403e00
lea eax, [ebp - 8]
push eax
push edi
call ebx
test eax, eax
jne 0x403df2
mov esi, edi
test edi, edi
je 0x403e00
nop dword [eax]
lea ebx, [esi + 0x10c]
push 0x411c88
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x403e16
push 0x411c90
push ebx
call dword [sym.imp.VCRUNTIME140.dll_strstr]
add esp, 8
test eax, eax
jne 0x403e16
mov esi, dword [esi]
test esi, esi
jne 0x403dc0
test edi, edi
je 0x403e00
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop ebx
pop edi
mov eax, 0x411c80
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x190]
lea ecx, [esi + 0x194]
call fcn.00403c10
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x4040a0
Capabilities:
Get disk information
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f4
mov eax, dword [0x417014]
xor eax, esp
mov dword [esp + 0x1f0], eax
push esi
push 0x80
lea eax, [esp + 0x174]
mov esi, ecx
push eax
push 0
push 0
lea eax, [esp + 0x14]
push eax
push 0x80
push 0x41b3c8
push 0x411cac
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
call fcn.00403d40
push eax
push dword [esp + 8]
call fcn.00403e40
push eax
lea eax, [esp + 0x7c]
push 0x411cb0
push eax
call fcn.0040c3f0
add esp, 0x14
test esi, esi
jne 0x404188
lea ecx, [esp + 0x70]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
lea edx, [ecx + 1]
mov dword [esp + 8], 0x67452301
mov dword [esp + 0xc], 0xefcdab89
mov dword [esp + 0x10], 0x98badcfe
mov dword [esp + 0x14], 0x10325476
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404140
sub ecx, edx
lea edx, [esp + 0x70]
push ecx
lea ecx, [esp + 0xc]
call fcn.004017a0
add esp, 4
lea edx, [esp + 8]
lea ecx, [esp + 0x60]
call fcn.00401870
mov edx, 0x10
lea ecx, [esp + 0x60]
call fcn.00403c10
pop esi
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
push 0x80
push 0
push 0x41b3c8
call sub.VCRUNTIME140.dll_memset
lea edx, [esp + 0x7c]
add esp, 0xc
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4041a3
sub edx, ecx
lea ecx, [esp + 0x70]
call fcn.00403c70
push eax
push 0x411cb8
push 0x41b3c8
call fcn.0040c410
mov ecx, dword [esp + 0x200]
add esp, 0xc
mov eax, 0x41b3c8
pop esi
xor ecx, esp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret

Function at 0x404260
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_ntohl]
push esi
mov esi, ecx
mov dword [ebp - 4], edx
push edi
push dword [esi]
call ebx
push dword [esi + 4]
mov dword [ebp - 8], eax
call ebx
mov edi, dword [ebp - 4]
mov ebx, eax
lea eax, [ebp - 0x18]
xor esi, esi
sub edi, eax
nop dword [eax]
lea eax, [edi + esi*4]
push dword [ebp + eax - 0x18]
call dword [sym.imp.WS2_32.dll_ntohl]
mov dword [ebp + esi*4 - 0x18], eax
inc esi
cmp esi, 4
jl 0x404290
mov edi, dword [ebp - 8]
xor edx, edx
lea esi, [edx + 0x10]
nop
mov ecx, ebx
lea edx, [edx - 0x61c88647]
shr ecx, 5
mov eax, ebx
add ecx, dword [ebp - 0x14]
shl eax, 4
add eax, dword [ebp - 0x18]
xor ecx, eax
lea eax, [edx + ebx]
xor ecx, eax
add edi, ecx
mov ecx, edi
mov eax, edi
shr ecx, 5
add ecx, dword [ebp - 0xc]
shl eax, 4
add eax, dword [ebp - 0x10]
xor ecx, eax
lea eax, [edx + edi]
xor ecx, eax
add ebx, ecx
sub esi, 1
jne 0x4042b0
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push edi
call esi
mov edi, dword [ebp + 8]
push ebx
mov dword [edi], eax
call esi
mov dword [edi + 4], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x405ea0
Capabilities:
Get graphical window text
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 5
mov dword [ebp - 0x108], 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
je 0x405fab
push ebx
mov ebx, dword [sym.imp.VCRUNTIME140.dll_strstr]
push edi
nop
lea eax, [ebp - 0x108]
mov dword [ebp - 0x108], 0
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test esi, esi
je 0x405f96
cmp dword [ebp - 0x108], 0
je 0x405f96
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0x104]
push 0x4120b0
push eax
call ebx
add esp, 8
test eax, eax
jne 0x405f60
lea eax, [ebp - 0x104]
push 0x4120c4
push eax
call ebx
add esp, 8
test eax, eax
je 0x405f96
push 0
push 0
push 0x10
push esi
call dword [sym.imp.USER32.dll_PostMessageA]
push dword [ebp - 0x108]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x405f96
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 2
push esi
call dword [sym.imp.USER32.dll_GetWindow]
mov esi, eax
test esi, esi
jne 0x405ee0
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x407480
Capabilities:
Create process on windows
Create process suspended
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x358
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x100
lea eax, [ebp - 0x304]
mov esi, ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x100
lea eax, [ebp - 0x104]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x100
lea eax, [ebp - 0x204]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x44
lea eax, [ebp - 0x358]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x30
mov dword [ebp - 0x358], 0x44
lea eax, [ebp - 0x204]
xorps xmm0, xmm0
movups xmmword [ebp - 0x314], xmm0
push 0
push 0
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x104]
push str._sG_Game.exe
push eax
call fcn.0040c3f0
push str.G_Gamee
lea eax, [ebp - 0x104]
push 0x91
push eax
call fcn.004029e0
push dword [esi]
lea eax, [esi + 4]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x304]
push str._s__s__d
push eax
call fcn.0040c3f0
add esp, 0x2c
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x358]
push eax
push 0
push 0
push 0x8000000
push 0
push 0
push 0
lea eax, [ebp - 0x304]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x408200
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40fee1
mov eax, dword fs:[0]
push eax
mov eax, 0x1260
call fcn.0040f6e0
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp dword [0x419230], 0
je 0x40842e
cmp dword [0x41924c], 0
je 0x40842e
mov ecx, 0x418dfc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408257
sub ecx, edx
cmp ecx, 5
jbe 0x40842e
push 0x810
lea eax, [ebp - 0x1224]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x100
lea eax, [ebp - 0x110]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
lea eax, [ebp - 0xa14]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x400
lea eax, [ebp - 0x614]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x104
lea eax, [ebp - 0x214]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push edi
lea eax, [ebp - 0x110]
push str._id_:__s_
push eax
call fcn.0040c3f0
add esp, 0x48
lea ecx, [ebp - 0x1254]
push 0x418dfc
call fcn.0040ba90
lea eax, [ebp - 0x1254]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x126c]
call fcn.0040c470
mov edx, eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x123c]
call fcn.0040c550
add esp, 4
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1258]
cmp eax, 0x10
jb 0x408336
inc eax
push eax
push dword [ebp - 0x126c]
call fcn.0040c0e0
cmp dword [ebp - 0x1228], 0x10
lea ecx, [ebp - 0x1224]
push ecx
lea ecx, [ebp - 0x110]
mov dword [ebp - 0x1258], 0xf
lea eax, [ebp - 0x123c]
mov dword [ebp - 0x125c], 0
cmovae eax, dword [ebp - 0x123c]
push ecx
push eax
mov byte [ebp - 0x126c], 0
call dword [0x41924c]
lea ecx, [ebp - 0x1224]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x408386
sub ecx, edx
cmp ecx, 0x3e8
mov ecx, dword [0x418cf0]
jae 0x4083ad
push 0x412334
push 5
push esi
call dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
jmp 0x408418
push 0x41233c
push 5
push esi
call dword [sym.imp.mfc140u.dll_CListCtrl::SetItemText]
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 5
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
push 0
push 0x10
lea eax, [ebp - 0x614]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea eax, [ebp - 0x614]
push eax
lea eax, [ebp - 0xa14]
push 0x4121d8
push eax
call fcn.0040c450
add esp, 0xc
lea eax, [ebp - 0xa14]
push eax
lea eax, [ebp - 0x1224]
push eax
push 0x4121ec
push edi
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0x123c]
call fcn.0040b9d0
lea ecx, [ebp - 0x1254]
call fcn.0040b9d0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x40a860
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
mov edi, esi
lea ecx, [edi + 2]
nop dword [eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x40a880
sub edi, ecx
sar edi, 1
test esi, esi
jne 0x40a8a5
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
cmp edi, 0x104
jge 0x40a893
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea ecx, [ebp - 0x210]
add esp, 0xc
sub ecx, esi
nop dword [eax + eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x40a8d0
add edi, edi
cmp edi, 0x20a
jae 0x40a9a5
xor eax, eax
mov word [ebp + edi - 0x210], ax
add edi, 2
cmp edi, 0x20a
jae 0x40a9a5
mov dword [ebp - 0x218], eax
xorps xmm0, xmm0
mov word [ebp + edi - 0x210], ax
mov ecx, 0x414
movq qword [ebp - 0x220], xmm0
mov ax, word [ebp - 0x220]
or ax, cx
mov dword [ebp - 0x21a], 0
movups xmmword [ebp - 0x230], xmm0
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x228], ecx
mov ecx, 0xffbf
and ax, cx
mov dword [ebp - 0x216], 0
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x230]
push eax
mov dword [ebp - 0x22c], 3
mov dword [ebp - 0x224], 0
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
mov ecx, dword [ebp - 4]
neg eax
pop edi
sbb eax, eax
xor ecx, ebp
inc eax
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
call fcn.0040eca7
int3

Function at 0x40c990
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.0040f6e0
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x1010]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
push eax
push 0x20019
push esi
push 0x412470
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ca79
push 0x1000
push eax
lea eax, [ebp - 0x1004]
mov dword [ebp - 0x1008], 3
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x100c], 0x400
lea eax, [ebp - 0x100c]
push eax
lea eax, [ebp - 0x1004]
push eax
lea eax, [ebp - 0x1008]
push eax
push esi
push 0x411bd8
push dword [ebp - 0x1010]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ca79
mov eax, dword [ebp - 0x100c]
push eax
mov dword [ebx], eax
call dword [sym.imp.mfc140u.dll_operator_1]
push dword [ebp - 0x100c]
mov esi, eax
push 0
push esi
call sub.VCRUNTIME140.dll_memset
push dword [ebp - 0x100c]
lea eax, [ebp - 0x1004]
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
push dword [ebp - 0x100c]
push esi
push edi
call sub.VCRUNTIME140.dll_memcpy
push esi
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 0x2c
mov esi, 1
push dword [ebp - 0x1010]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret
Function at 0x40d200
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
call fcn.0040cf80
test eax, eax
je 0x40d236
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call ebx
mov ecx, edi
call fcn.0040cf80
test eax, eax
jne 0x40d227
push 4
push edi
push 0x700b
push 0xffff
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 1
push eax
push 0x98000004
push dword [esi + 0x1c]
mov dword [ebp - 0x18], 0x7530
mov dword [ebp - 0x14], 0x1388
call dword [sym.imp.WS2_32.dll_WSAIoctl]
lea ebx, [edi + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [edi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [edi + 4]
push 0
push 0
push 1
push dword [esi + 0x1c]
push edi
call dword [0x4192c8]
cmp byte [ebp + 8], 0
je 0x40d31a
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [edi + 4]
push ebx
call eax
push dword [edi + 4]
push 0
push 0
push 3
push dword [esi + 0x1c]
push edi
call dword [0x4192c8]
mov edi, dword [esi + 0x1c]
cmp edi, 0xffffffff
je 0x40d3db
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40d3db
mov dword [esi + 0x18], 2
cmp dword [edi + 0x20], 0
je 0x40d35f
push dword [esi + 0x20]
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [esi + 0x30], 0
push 4
call dword [sym.imp.mfc140u.dll_operator_1]
mov dword [esi + 0x20], eax
add esp, 4
add eax, dword [esi + 0x30]
mov dword [ebp - 0x20], eax
mov eax, 4
sub eax, dword [esi + 0x30]
mov dword [esi + 0x2c], 4
jmp 0x40d36a
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x20], eax
mov eax, dword [0x41761c]
push 0
push esi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x10], 0
push eax
push 1
lea eax, [ebp - 0x24]
mov dword [ebp - 8], 0
push eax
push dword [esi + 0x1c]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x40d400
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
je 0x40d400
cmp eax, 0x3e5
je 0x40d400
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
call eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
dec dword [edi + 4]
push ebx
call eax
push dword [edi + 4]
push 0
push 0
push 3
push dword [esi + 0x1c]
push edi
call dword [0x4192c8]
mov ecx, dword [esi + 0x1c]
call fcn.0040de20
push dword [esi + 0x20]
mov dword [esi + 0x1c], 0xffffffff
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
mov dword [esi + 0x20], 0
push 0x34
push esi
call fcn.0040ee7c
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret 8
Function at 0x40d640
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
push dword [esi + 0x20]
mov edi, dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_2]
push 0x34
push esi
mov dword [esi + 0x20], 0
call fcn.0040ee7c
add esp, 0xc
cmp byte [ebp + 8], 0
je 0x40d6c0
cmp edi, 0xffffffff
je 0x40d6af
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x80
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
push dword [ebx + 4]
push 0
push 0
push 5
push edi
push ebx
call dword [0x4192c8]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret 8
Function at 0x40d940
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push 0
push 0
mov edi, ecx
push 0x7010
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0
push 1
push dword [edi]
push edi
call dword [0x4192c0]
cmp byte [ebp + 8], 0
je 0x40d981
push dword [ebp + 0xc]
push ecx
mov ecx, edi
call fcn.0040dbd0
pop edi
pop ebp
ret 8
push esi
mov esi, dword [ebp + 0xc]
push dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_2]
add esp, 4
cmp dword [edi + 4], 0
je 0x40d9a8
push 4
call dword [sym.imp.mfc140u.dll_operator_1]
mov dword [esi + 0x28], 4
jmp 0x40d9ba
push 0xffff
call dword [sym.imp.mfc140u.dll_operator_1]
mov dword [esi + 0x28], 0xffff
add esp, 4
mov dword [esi + 0x1c], eax
mov ecx, edi
mov dword [esi + 0x18], 2
mov dword [esi + 0x2c], 0
push esi
call fcn.0040db30
cmp eax, 1
jne 0x40d9e4
push esi
push ecx
mov ecx, edi
call fcn.0040dbd0
pop esi
pop edi
pop ebp
ret 8

Function at 0x40db30
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
mov esi, dword [ebp + 8]
push 0
push esi
mov dword [ebp - 0xc], 0
mov eax, dword [esi + 0x1c]
add eax, dword [esi + 0x2c]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x2c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [esi + 0x24]
mov dword [esi + 0x14], ecx
push eax
push 1
lea eax, [ebp - 0x14]
mov dword [esi + 0x18], 2
push eax
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
je 0x40dbae
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
je 0x40dbae
cmp eax, 0x3e5
je 0x40dbae
mov eax, 1
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 8]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret 4

Function at 0x40dbd0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x417014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
push dword [esi + 0x1c]
call dword [sym.imp.mfc140u.dll_operator_2]
push 0x30
push esi
mov dword [esi + 0x1c], 0
call fcn.0040ee7c
add esp, 0xc
push 0
push 0
push 3
push dword [edi]
push edi
call dword [0x4192c0]
mov esi, dword [edi]
cmp esi, 0xffffffff
je 0x40dc46
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x80
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 2
push esi
call dword [sym.imp.WS2_32.dll_shutdown]
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov dword [edi], 0xffffffff
xor ecx, ebp
pop edi
pop esi
call fcn.0040e8e5
mov esp, ebp
pop ebp
ret 8