joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100d1b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.0100d140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.0100d140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.0100d140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.0100d140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0x100dbfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x100dc50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x101f87c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100dc43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x100dc52
xor eax, eax
pop esi
leave
ret 4
Function at 0x431000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43100c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x403e6a
sub eax, 0x403e10
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
jl 0x431030
nop
nop
nop
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43101e
nop
nop
nop
nop
popal
nop
jmp loc.00401219
Function at 0x410c70
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0x4025e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x70
call sub.MSVBVM60.DLL___vbaChkstk
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x14], 0x401f20
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 1
mov dword [ebp - 4], 2
push 0xffffffffffffffff
call dword [sym.imp.MSVBVM60.DLL___vbaOnError]
mov dword [ebp - 4], 3
call fcn.00404fd8
mov dword [ebp - 0x6c], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
lea eax, [ebp - 0x64]
push eax
push 0x28
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00405038
mov dword [ebp - 0x70], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
xor edx, edx
cmp dword [ebp - 0x70], 0
setne dl
neg edx
movsx eax, dx
test eax, eax
je 0x410e25
mov dword [ebp - 4], 4
xor ecx, ecx
test ecx, ecx
je 0x410d46
mov dword [ebp - 4], 6
mov dword [ebp - 0x6c], 0x1c
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x3c]
push eax
push 0x1c
lea ecx, [ebp - 0x60]
push ecx
push 0
mov edx, dword [ebp - 0x64]
push edx
call fcn.00405088
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
jmp 0x410e25
mov dword [ebp - 4], 9
lea eax, [ebp - 0x44]
push eax
push 0x404ae4
lea ecx, [ebp - 0x68]
push ecx
call dword [sym.imp.MSVBVM60.DLL___vbaStrToAnsi]
push eax
push 0
call fcn.004050e8
mov dword [ebp - 0x6c], eax
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
xor edx, edx
cmp dword [ebp - 0x6c], 0
setne dl
neg edx
mov word [ebp - 0x74], dx
lea ecx, [ebp - 0x68]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
movsx eax, word [ebp - 0x74]
test eax, eax
je 0x410e25
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x60], 1
mov dword [ebp - 4], 0xb
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 2
jae 0x410dc3
mov dword [ebp - 0x8c], 0
jmp 0x410dcf
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x8c], eax
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x74]
imul edx, edx, 0xc
lea eax, [ebp + edx - 0x5c]
push eax
push 8
call dword [sym.imp.MSVBVM60.DLL___vbaCopyBytes]
mov dword [ebp - 4], 0xc
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 2
jae 0x410e06
mov dword [ebp - 0x90], 0
jmp 0x410e12
call dword [sym.imp.MSVBVM60.DLL___vbaGenerateBoundsError]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x74]
imul ecx, ecx, 0xc
mov dword [ebp + ecx - 0x54], 2
jmp 0x410d14
mov dword [ebp - 4], 0x11
mov edx, dword [ebp - 0x64]
push edx
call fcn.00404e50
call dword [sym.imp.MSVBVM60.DLL___vbaSetSystemError]
push 0x410e4d
jmp 0x410e4c
ret

Function at 0x430006
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
call 0x43000c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x403d6a
sub eax, 0x403d10
nop
nop
nop
mov ebx, dword [eax]
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
popal
nop
nop
jmp fcn.00401219
Function at 0x40261f
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, eax
push edi
mov edi, esi
call fcn.00401896
call fcn.004025a9
push 2
xor ebx, ebx
push ebx
push dword [esp + 0x18]
call fcn.00454065
push dword [esp + 0x1c]
call fcn.00454287
push ebx
push ebx
push dword [esp + 0x28]
mov edi, eax
call fcn.00454065
add esp, 0x1c
cmp edi, ebx
jne 0x402660
mov eax, dword [esi + 0x30]
jmp 0x4026cd
lea eax, [edi + 1]
push eax
call fcn.00452c78
push dword [esp + 0x14]
mov dword [esi + 0x40], eax
push edi
push 1
push eax
call fcn.00454595
add esp, 0x14
cmp eax, edi
je 0x402684
push 5
jmp 0x4026c3
mov eax, dword [esi + 0x40]
mov byte [edi + eax], bl
mov edi, dword [esi + 0x40]
jmp 0x40269e
movzx eax, al
push eax
call fcn.004539d0
pop ecx
test eax, eax
je 0x4026a4
inc edi
mov al, byte [edi]
test al, al
jns 0x40268f
lea ecx, [esi + 0x2c]
mov eax, edi
call fcn.00401480
cmp eax, ebx
je 0x4026c1
cmp byte [eax], bl
je 0x4026c1
mov edx, dword [esi]
push ebx
push eax
mov ecx, esi
call dword [edx + 0x3c]
jmp 0x40265b
push 0xf
pop eax
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x30], eax
pop edi
pop esi
pop ebx
ret 4
Function at 0x409a1d
Capabilities:
Hide graphical window

Disassembly:
push dword [esi + 8]
call fcn.004099c1
mov ecx, eax
call fcn.0040a547
push 0
push dword [esi + 8]
call dword [sym.imp.USER32.dll_ShowWindow]
ret

Function at 0x40a69e
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x4a0590]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push 0x118
lea eax, [ebp - 0x14c]
push 0
push eax
call fcn.0045f360
push 0x114
lea eax, [ebp - 0x150]
push 0
push eax
call fcn.0045f360
add esp, 0x18
lea eax, [ebp - 0x150]
push eax
mov dword [ebp - 0x150], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
xor eax, eax
mov byte [ebp - 0x34], 0
lea edi, [ebp - 0x33]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0xa
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x14c]
call fcn.00459543
xor eax, eax
mov byte [ebp - 0x1c], 0
lea edi, [ebp - 0x1b]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
push 0xa
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x148]
call fcn.00459543
add esp, 0x18
cmp dword [ebp - 0x14c], 6
pop edi
jne 0x40a74c
cmp dword [ebp - 0x148], 2
jne 0x40a74c
mov al, 1
jmp 0x40a74e
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00453655
leave
ret

Function at 0x40aa91
Capabilities:
Create process on windows

Disassembly:
push 1
push 0
push 0
push dword [esp + 0x14]
push str.open
push dword [esp + 0x18]
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
ret

Function at 0x40ae20
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x20
mov eax, 0x47248d
call fcn.00459c0d
mov edi, ecx
mov ebx, dword [edi + 0x10]
lea esi, [ebp - 0x24]
call fcn.0040a364
mov ebx, dword [edi + 0xc]
lea esi, [ebp - 0x2c]
call fcn.0040a364
push dword [ebp - 0x20]
lea eax, [ebp - 0x2c]
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push eax
mov eax, edi
call fcn.0040c5bc
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push closesocket
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], esi
cmp ebx, 0xffffffff
jne 0x40ae83
xor al, al
jmp 0x40aedd
lea eax, [ebp - 0x1c]
push eax
push ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0x100000
cmp eax, ecx
ja 0x40ae9f
mov ecx, eax
push ecx
mov eax, edi
call fcn.0040bdd0
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
push esi
lea ecx, [ebp - 0x18]
push ecx
push eax
mov eax, edi
call fcn.0040be4f
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
push ebx
cmp eax, dword [ebp - 0x18]
sete byte [ebp - 0x11]
or dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x11]
call fcn.00459ce5
ret
Function at 0x40aee3
Capabilities:
Write file on windows

Disassembly:
push 0xc
mov eax, 0x4710f1
call fcn.00459c0d
xor esi, esi
push esi
push esi
push 2
push esi
push esi
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], esi
cmp ebx, 0xffffffff
je 0x40af3c
push esi
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp + 0xc]
mov dword [ebp - 0x14], esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [ebp - 0x14], edi
push ebx
sete byte [ebp - 0xd]
or dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0xd]
jmp 0x40af3e
xor al, al
call fcn.00459ce5
ret

Function at 0x40af44
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, eax
mov eax, ecx
shr eax, 5
push edi
mov edi, 0x47a94c
test eax, eax
jbe 0x40af7e
mov eax, ecx
shr eax, 5
mov dword [ebp - 8], eax
push ebx
mov edx, edi
mov dword [ebp - 4], 0x20
mov bl, byte [edx]
xor byte [esi], bl
inc esi
inc edx
dec dword [ebp - 4]
jne 0x40af6d
dec dword [ebp - 8]
jne 0x40af64
pop ebx
shl eax, 5
sub ecx, eax
je 0x40af8e
mov al, byte [edi]
xor byte [esi], al
inc esi
inc edi
dec ecx
jne 0x40af85
pop edi
pop esi
leave
ret

Function at 0x40afdf
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor esi, esi
push esi
push esi
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
push 0x3c
push dword [ebp + 8]
mov dword [eax], esi
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call ebx
cmp dword [ebp - 4], 4
je 0x40b028
xor al, al
jmp 0x40b073
mov eax, dword [ebp - 8]
push esi
push esi
add eax, 0x98
push eax
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 4]
push eax
push 4
push dword [ebp + 0xc]
push dword [ebp + 8]
call ebx
cmp dword [ebp - 4], 4
jne 0x40b024
mov eax, dword [ebp - 8]
push esi
push esi
add eax, 0x9c
push eax
push dword [ebp + 8]
call edi
push esi
lea eax, [ebp - 4]
push eax
push 4
push dword [ebp + 0x10]
push dword [ebp + 8]
call ebx
cmp dword [ebp - 4], 4
sete al
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40b91c
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x18
mov eax, 0x4714ec
call fcn.00459c0d
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
mov esi, ecx
push 0x47eef4
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edi
call fcn.004095a2
lea eax, [ebp - 0x18]
push eax
push 0x20019
mov dword [ebp - 4], edi
push edi
push dword [ebp - 0x14]
xor ebx, ebx
push dword [ebp - 0x10]
inc ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ba05
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 0x20]
mov dword [ebp - 0x14], edi
push dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
call esi
test eax, eax
jne 0x40b9fc
cmp dword [ebp - 0x14], ebx
je 0x40b9a8
cmp dword [ebp - 0x14], 2
jne 0x40b9fc
mov eax, dword [ebp - 0x1c]
call fcn.0040bacf
mov eax, dword [ebp - 0x10]
cmp eax, edi
jbe 0x40b9fc
mov ecx, dword [ebp - 0x1c]
call fcn.0040bbfb
mov eax, dword [ebp - 0x10]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00452c78
pop ecx
mov ebx, eax
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x14]
push eax
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call esi
push ebx
push dword [ebp - 0x1c]
call fcn.004095cb
push ebx
call fcn.00453b90
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x1c]
call fcn.00459ce5
ret

Function at 0x40dee0
Capabilities:
Create thread

Disassembly:
push esi
push edi
mov esi, eax
call fcn.0040df34
mov eax, dword [esp + 0xc]
push str.http:__b1.org_support.jsp_srcinsttimeoutisid
lea edi, [esi + 4]
push edi
mov dword [esi], eax
call fcn.004095cb
call fcn.00436197
add eax, 0x34
cmp dword [eax + 0x18], 8
jb 0x40df10
mov eax, dword [eax + 4]
jmp 0x40df13
add eax, 4
push eax
push edi
call fcn.0040baa6
xor eax, eax
push eax
push eax
push esi
push 0x40df5d
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop edi
mov dword [esi + 0x20], eax
pop esi
ret 4

Function at 0x40df34
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40df5c
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 0x20], 0
or dword [esi], 0xffffffff
lea eax, [esi + 4]
jmp fcn.0040bacf
ret
Function at 0x40e14c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
push 0x44
push 1
mov ebx, eax
call dword [0x4a184c]
mov edi, eax
xor eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], 8
mov dword [esi + 0x3dc], edi
cmp edi, eax
je 0x40e209
push dword [ebp + 0xc]
mov dword [esi + 0x3cc], ebx
mov dword [esi + 0x3d4], eax
mov dword [esi + 0x3d8], eax
mov dword [esi + 0x3d0], eax
mov dword [edi], eax
push ebx
push dword [ebp + 8]
lea eax, [edi + 0xc]
mov ebx, eax
call fcn.0040dfdf
add esp, 0xc
test eax, eax
je 0x40e209
mov eax, dword [esi + 0x3c8]
xor ebx, ebx
cmp eax, ebx
je 0x40e1c5
push eax
call dword [0x4a1840]
pop ecx
mov dword [esi + 0x3c8], ebx
push dword [ebp + 8]
call dword [0x4a1848]
pop ecx
mov dword [esi + 0x3c8], eax
cmp eax, ebx
je 0x40e209
push ebx
push ebx
lea eax, [edi + 0xc]
push eax
push 0x40e07f
push ebx
push ebx
call fcn.00456b57
add esp, 0x18
cmp eax, ebx
je 0x40e1f7
cmp eax, 0xffffffff
jne 0x40e1f9
xor eax, eax
mov dword [edi], eax
cmp eax, ebx
jne 0x40e221
call fcn.00454f1f
mov eax, dword [eax]
mov dword [ebp - 4], eax
lea ebx, [esi + 0x3c8]
call fcn.0040e10f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40e224
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret

Function at 0x40ea47
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov esi, eax
xor eax, eax
xor edi, edi
cmp dword [esi + 0x454], edi
push 4
setne al
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 8
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x40ea88
push ebx
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
call fcn.004290d9
pop ecx
pop ecx
jmp 0x40eaec
mov eax, dword [esi + 0x458]
mov ecx, closesocket
and eax, ecx
imul eax, eax, 0x3e8
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x45c]
and eax, ecx
imul eax, eax, 0x3e8
push edi
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push edi
push edi
push 0xc
lea eax, [ebp - 0x14]
push eax
push 0x98000004
push ebx
mov dword [ebp - 0x14], 1
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x40eaec
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebx
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
call fcn.004290d9
add esp, 0xc
pop edi
pop esi
leave
ret
Function at 0x40f046
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x4a0590]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, ecx
cmp dword [ebx + 0x8c], 2
push esi
mov esi, dword [ebx]
push edi
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x118], esi
je 0x40f19b
cmp dword [ebx + 0x1cc], 0
jne 0x40f194
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x10c]
push eax
push dword [ebp + 8]
mov edi, 0x80
mov dword [ebp - 0x114], edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x40f0ce
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push ebx
call fcn.0042cb77
push eax
push edi
push str.getpeername___failed_with_errno__d:__s
call fcn.00429149
add esp, 0x10
jmp 0x40f19b
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x8c]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x114], edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x40f106
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
push ebx
call fcn.0042cb77
push eax
push edi
push str.getsockname___failed_with_errno__d:__s
jmp 0x40f0c1
lea esi, [ebx + 0xb6]
add ebx, 0xe4
mov eax, esi
lea edi, [ebp - 0x10c]
call fcn.0040f00c
test eax, eax
jne 0x40f148
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x110]
mov edi, eax
call fcn.0042cb77
push eax
push edi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
mov esi, dword [ebp - 0x118]
jmp 0x40f0c1
mov eax, dword [ebp - 0x110]
lea edi, [eax + 0x58]
push 0xb
pop ecx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ebx, [eax + 0x118]
add eax, 0xe8
lea edi, [ebp - 0x8c]
call fcn.0040f00c
test eax, eax
jne 0x40f18e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x110]
mov edi, eax
call fcn.0042cb77
push eax
push edi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
jmp 0x40f13d
mov ebx, dword [ebp - 0x110]
mov eax, ebx
call fcn.0040efc1
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453655
leave
ret
Function at 0x40f47c
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, eax
mov esi, dword [edi]
mov eax, dword [esi + 0x354]
push 4
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 1
push 6
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x40f4c4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push edi
mov edi, eax
call fcn.0042cb77
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
call fcn.004290d9
add esp, 0xc
jmp 0x40f4cf
push str.TCP_NODELAY_set_n
call fcn.004290d9
pop ecx
pop edi
pop esi
leave
ret

Function at 0x40f4d3
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x4a0590]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
push 2
mov dword [ebp - 0x12c], 0x4020
mov dword [ebp - 0x130], edi
mov dword [ebp - 0x134], 4
pop ebx
cmp dword [0x4a3778], edi
jne 0x40f567
mov esi, 0x11c
push esi
lea eax, [ebp - 0x128]
push edi
push eax
call fcn.0045f360
add esp, 0xc
push 3
push ebx
push edi
push edi
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x124], 6
call dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
push edx
push eax
push ebx
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x40f55d
mov dword [0x4a3778], ebx
jmp 0x40f5b8
mov dword [0x4a3778], 1
cmp dword [0x4a3778], ebx
je 0x40f5b8
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x130]
push eax
mov edi, 0x1001
push edi
mov esi, 0xffff
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40f5a4
mov eax, dword [ebp - 0x130]
cmp eax, dword [ebp - 0x12c]
jg 0x40f5b8
push 4
lea eax, [ebp - 0x12c]
push eax
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453655
leave
ret
Function at 0x40f5c7
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe0
mov eax, dword [0x4a0590]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
and dword [ebp - 0xd8], 0
push ebx
push esi
mov esi, dword [ecx]
or dword [eax], 0xffffffff
push edi
push edx
lea ebx, [ebp - 0xd0]
lea edx, [ebp - 0xcc]
mov dword [ebp - 0xd4], ecx
mov dword [ebp - 0xdc], eax
call fcn.0040f9c0
pop ecx
test eax, eax
jne 0x40f7fe
lea ebx, [ebp - 0xe0]
lea eax, [ebp - 0x38]
lea edi, [ebp - 0xbc]
call fcn.0040f00c
test eax, eax
jne 0x40f66a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0xd4]
mov edi, eax
call fcn.0042cb77
pop ecx
push eax
push edi
push str.sa_addr_inet_ntop___failed_with_errno__d:__s
call fcn.00429149
mov ebx, dword [ebp - 0xd0]
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 0xd4]
mov esi, ebx
call fcn.0040f97c
mov eax, edi
jmp 0x40f800
lea eax, [ebp - 0x38]
push eax
push str.__Trying__s..._n
call fcn.004290d9
cmp dword [esi + 0x354], 0
mov ebx, dword [ebp - 0xd0]
mov edi, dword [ebp - 0xd4]
pop ecx
pop ecx
je 0x40f698
push ebx
mov eax, edi
call fcn.0040f47c
pop ecx
push ebx
call fcn.0040f4d3
cmp dword [esi + 0x454], 0
pop ecx
je 0x40f6af
mov eax, esi
call fcn.0040ea47
mov eax, dword [esi + 0x1b0]
test eax, eax
je 0x40f6d6
push 0
push ebx
push dword [esi + 0x1b4]
call eax
add esp, 0xc
cmp eax, 2
jne 0x40f70f
mov dword [ebp - 0xd8], 1
push dword [ebp - 0xcc]
mov ecx, edi
push ebx
call fcn.0040eb83
pop ecx
pop ecx
mov dword [ebp - 0xd0], eax
test eax, eax
je 0x40f71b
mov esi, ebx
mov eax, edi
call fcn.0040f97c
mov eax, dword [ebp - 0xd0]
dec eax
neg eax
sbb eax, eax
and eax, dword [ebp - 0xd0]
jmp 0x40f800
test eax, eax
je 0x40f6d6
push 0x2a
pop edi
jmp 0x40f656
push 1
push ebx
call fcn.00424efd
pop ecx
pop ecx
call fcn.0042f5a7
cmp dword [edi + 0x234], 1
mov dword [edi + 0x22c], eax
mov dword [edi + 0x230], edx
jle 0x40f74d
push dword [edi + 0x238]
mov eax, esi
call fcn.00424abb
pop ecx
cmp dword [ebp - 0xd8], 0
jne 0x40f7f6
cmp dword [edi + 0x8c], 1
jne 0x40f7f6
push dword [ebp - 0xc0]
lea eax, [ebp - 0xbc]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40f7e6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0xd8], eax
cmp eax, 0xb
je 0x40f7df
cmp eax, 0x2732
jle 0x40f79f
cmp eax, 0x2734
jle 0x40f7df
push edi
mov edi, eax
call fcn.0042cb77
pop ecx
push eax
lea eax, [ebp - 0x38]
push eax
push str.Immediate_connect_fail_for__s:__s_n
call fcn.004290d9
mov eax, dword [ebp - 0xd8]
mov dword [esi + 0x85dc], eax
mov eax, dword [ebp - 0xd4]
add esp, 0xc
mov esi, ebx
call fcn.0040f97c
mov dword [ebp - 0xd0], 7
jmp 0x40f7ee
and dword [ebp - 0xd0], 0
mov eax, dword [ebp - 0xdc]
mov dword [eax], ebx
mov eax, dword [ebp - 0xd0]
jmp 0x40f800
mov eax, dword [ebp - 0xdc]
mov dword [eax], ebx
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00453655
leave
ret