joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47bf29
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x54b3f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push esi
mov dword [ebp - 0x210], esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebx, dword [ebp + 0xc]
push eax
push esi
push ebx
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov esi, eax
cmp ebx, 0x21
jb 0x47bf79
cmp ebx, 0x28
jbe 0x47bf73
cmp ebx, 0x2c
jbe 0x47bf79
cmp ebx, 0x2e
ja 0x47bf79
or esi, 0x100
cmp dword [ebp + 0x10], 0
je 0x47bf85
or esi, 0x1000000
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.004d9310
add esp, 0xc
push 0x104
lea eax, [ebp - 0x20c]
push eax
shl esi, 0x10
push esi
call dword [sym.imp.USER32.dll_GetKeyNameTextW]
push 0xffffffffffffffff
lea eax, [ebp - 0x20c]
push eax
mov ecx, edi
call fcn.0043af89
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d5e0b
leave
ret 0xc

Function at 0x485724
Capabilities:
Log keystrokes via polling

Disassembly:
sub ecx, 0x6c0
jmp method.DuiLib::CMenuUI.2.virtual_324

Function at 0x485d93
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x54b3f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
and dword [ebx + 0x774], 0
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x1c]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 0x2c], ecx
mov ecx, dword [ebp + 0x20]
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebx + 0x770], eax
mov dword [ebx + 0x778], ecx
test eax, eax
jne 0x485dfb
call fcn.00485c91
mov edx, dword [eax]
push edi
mov ecx, eax
call dword [edx + 0xc]
test esi, esi
je 0x485dfb
call fcn.00485c91
mov edx, dword [eax]
push esi
mov ecx, eax
call dword [edx + 0x14]
lea esi, [ebx + 0x10]
call fcn.00485c91
mov edx, dword [eax]
push esi
mov ecx, eax
call dword [edx]
mov ecx, dword [ebx + 0x770]
test ecx, ecx
jne 0x485e18
mov ecx, edi
jmp 0x485e1f
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov ecx, eax
call fcn.0043b9e1
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x18], eax
call fcn.0043a850
push 0
sub esp, 0x10
mov edi, esp
mov esi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x88
push SysReAllocString
movsd dword es:[edi], dword [esi]
push 0
push dword [ebp - 0x18]
mov ecx, ebx
movsd dword es:[edi], dword [esi]
call fcn.004434f8
mov edi, dword [ebx + 4]
mov esi, dword [sym.imp.USER32.dll_GetParent]
jmp 0x485e62
push edi
call esi
mov edi, eax
push edi
call esi
test eax, eax
jne 0x485e5d
push 5
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 1
push 0x86
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d5e0b
leave
ret 0x1c
Function at 0x4884ae
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x54b3f0]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x294]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4884da
xor eax, eax
jmp 0x488559
push 0xfe
lea eax, [ebp - 0x103]
push 0
push eax
mov byte [ebp - 0x104], 0
call fcn.004d9310
add esp, 0xc
push 0xff
lea eax, [ebp - 0x104]
push eax
call sub.WS2_32.dll_gethostname
lea eax, [ebp - 0x104]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4884d6
mov eax, dword [eax + 0xc]
push 4
push dword [eax]
lea eax, [ebp - 0x298]
push eax
call fcn.004d9440
movzx eax, byte [ebp - 0x298]
movzx ecx, byte [ebp - 0x297]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x296]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x295]
shl eax, 8
add esp, 0xc
add eax, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004d5e0b
leave
ret

Function at 0x489f0c
Capabilities:
Hide graphical window

Disassembly:
push 0x9c
mov eax, 0x502079
call fcn.004da051
mov eax, dword [ebp + 8]
mov ebx, ecx
xor esi, esi
mov dword [ebx + 0x10], eax
mov dword [eax + 0x598], esi
cmp dword [ebx + 4], esi
jne 0x489f98
lea eax, [ebp - 0xa8]
push eax
call fcn.00489c0b
mov ecx, dword [ebx + 0x10]
mov eax, dword [ecx]
push esi
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0xa8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0
movsd dword es:[edi], dword [esi]
push 0x40000000
push 0
movsd dword es:[edi], dword [esi]
call dword [eax + 0x1c]
mov ecx, eax
call fcn.0043b9e1
push eax
mov ecx, ebx
call fcn.004434f8
mov esi, dword [ebx + 0x10]
mov ecx, esi
call fcn.0043c3d9
push eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c]
mov ecx, eax
call fcn.0043cb83
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
push 1
push dword [eax]
push 0x30
push dword [ebx + 4]
call esi
jmp 0x489f9e
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebx + 0x10]
mov eax, dword [ecx]
lea edx, [ebp - 0x94]
push edx
call dword [eax + 0x28]
and dword [ebp - 4], 0
mov ecx, eax
call fcn.0043ac95
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
mov byte [ebp - 0x95], al
call fcn.0043ab6a
cmp byte [ebp - 0x95], 0
mov edi, 0x588
je 0x489fe7
mov eax, dword [ebx + 0x10]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [ebx + 0x10]
call fcn.00489d44
test al, al
je 0x489ffa
push str.yyyy_MM_dd_HH:mm:ss
jmp 0x489fff
push str.yyyy_MM_dd
push 0
push 0x1032
push dword [ebx + 4]
call esi
mov eax, dword [ebx + 0x10]
add eax, edi
push 0x10
push eax
lea eax, [ebx + 0x1a]
push eax
call fcn.004d9440
mov eax, dword [ebx + 0x10]
add esp, 0xc
add eax, edi
push eax
push 0
push 0x1002
push dword [ebx + 4]
call esi
push 4
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SetFocus]
mov byte [ebx + 0x18], 1
call fcn.004da0d4
ret 4
Function at 0x490560
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
push esi
push 0x518c00
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
test esi, esi
jne 0x49057a
pop esi
pop ebp
pop ecx
ret
push ebx
push edi
push str.LoadLibraryExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, dword [esp + 0x18]
mov edi, eax
push 0x518bec
push ebx
mov dword [esp + 0x18], edi
call fcn.004ddc10
add esp, 8
test eax, eax
je 0x4905c6
test edi, edi
je 0x4905b7
push 8
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
test edi, edi
je 0x4905ec
push str.AddDllDirectory
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4905ec
push 0x800
push 0
push ebx
call edi
pop edi
pop ebx
pop esi
mov ebp, eax
pop ebp
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, eax
test edi, edi
je 0x4906a0
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x490605
sub eax, edx
lea eax, [eax + edi + 1]
push eax
call dword [0x54ae68]
mov esi, eax
add esp, 4
test esi, esi
je 0x490696
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x490696
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x490633
sub eax, edx
mov ecx, 0x5c
mov word [eax + esi], cx
mov eax, esi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x490650
sub eax, edx
lea edx, [eax + esi]
mov ecx, ebx
sub edx, ebx
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x490660
mov eax, dword [esp + 0x10]
test eax, eax
je 0x49068d
push 8
push 0
push esi
call eax
push esi
mov ebp, eax
call dword [0x54ae6c]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
push esi
call dword [0x54ae6c]
add esp, 4
pop edi
pop ebx
pop esi
mov eax, ebp
pop ebp
pop ecx
ret

Function at 0x4906b0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
test byte [esp + 0x194], 2
je 0x4906f3
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x4906e7
mov eax, dword [esp]
cmp al, 2
jne 0x4906e1
shr eax, 8
cmp al, 2
je 0x4906f3
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
add esp, 0x190
ret
call fcn.004a4d80
test eax, eax
jne 0x49074f
push str.iphlpapi.dll
call fcn.00490560
add esp, 4
mov dword [0x54efc8], eax
test eax, eax
je 0x490727
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x490727
mov dword [0x54efcc], eax
push 3
push 2
push 0
push 6
call fcn.004a4f50
add esp, 0x10
neg eax
sbb eax, eax
neg eax
push 0x551148
mov dword [0x551150], eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add esp, 0x190
ret
Function at 0x497710
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
mov eax, dword [esi + 0x78]
push edi
mov dword [esp + 0x34], eax
test eax, eax
je 0x4978e5
lea eax, [esp + 0x20]
push eax
call fcn.004a4b70
mov ecx, dword [eax + 4]
mov edx, dword [eax + 0xc]
mov ebp, dword [eax]
mov ebx, dword [eax + 8]
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
add esp, 4
push 0
push 0x3e8
push eax
push edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], edx
call fcn.004dd100
add ebp, eax
adc dword [esp + 0x14], edx
imul eax, eax, 0x3e8
sub edi, eax
imul edi, edi, 0x3e8
add ebx, edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebx
cmp ebx, 0xf4240
jl 0x49779c
add ebp, 1
adc dword [esp + 0x14], 0
sub ebx, 0xf4240
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebx
mov eax, dword [esi + 0xf60]
mov edi, dword [esp + 0x40]
lea ecx, [esi + 0xf60]
test eax, eax
je 0x4977cc
mov edx, dword [eax]
cmp dword [edx + 0x20], edi
je 0x4977c0
mov eax, dword [eax + 8]
test eax, eax
jne 0x4977b0
jmp 0x4977cc
push 0
push eax
push ecx
call fcn.004c10c0
add esp, 0xc
mov ecx, edi
lea eax, [esp + 0x10]
mov edx, esi
call fcn.00497660
mov eax, dword [esi + 0xf28]
or eax, dword [esi + 0xf2c]
jne 0x4977f3
cmp dword [esi + 0xf30], eax
je 0x49787d
mov ecx, dword [esi + 0xf28]
mov edx, dword [esi + 0xf2c]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esi + 0xf30]
mov dword [eax + 4], edx
mov edx, dword [esi + 0xf34]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x24]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x2c]
sub esp, 0x10
mov eax, esp
mov dword [eax], ebp
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], edx
call fcn.004a4c10
add esp, 0x20
test edx, edx
jg 0x4978e5
jl 0x49784d
test eax, eax
jne 0x4978e5
mov edi, dword [esp + 0x34]
mov edx, dword [edi + 0x5c]
lea eax, [edi + 0x5c]
push eax
lea ecx, [esi + 0xf38]
push ecx
push edx
call fcn.004c7a70
add esp, 0xc
test eax, eax
je 0x497881
push eax
push str.Internal_error_removing_splay_node___d_n
push esi
call fcn.00499d70
add esp, 0xc
jmp 0x497881
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0xf28], ebp
mov dword [esi + 0xf2c], eax
mov dword [esi + 0xf30], ebx
mov dword [esi + 0xf34], ecx
mov dword [esi + 0xf58], esi
mov eax, dword [edi + 0x5c]
mov ecx, dword [esi + 0xf28]
lea edx, [esi + 0xf38]
push edx
mov edx, dword [esi + 0xf2c]
push eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esi + 0xf30]
mov dword [eax + 4], edx
mov edx, dword [esi + 0xf34]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
call fcn.004c7850
add esp, 0x18
mov dword [edi + 0x5c], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x499c10
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x499c53
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esp + 0x10]
xor ecx, ecx
cmp eax, 0x2733
sete cl
mov dword [edx], 0
mov eax, ecx
neg eax
sbb eax, eax
and eax, 0x19
add eax, 0x38
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x499cd0
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
xor edi, edi
cmp dword [esi + 0xbfc], edi
je 0x499d65
cmp dword [esi + 0x620], edi
je 0x499d25
push 1
push esi
call fcn.00497a10
mov eax, dword [esi + 0x5b4]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esi + 0x620]
push edx
push eax
push esi
call ecx
push 0
push esi
mov edi, eax
call fcn.00497a10
add esp, 0x24
mov eax, edi
pop edi
pop esi
ret
mov eax, dword [esp + 0x10]
test eax, eax
js 0x499d65
cmp eax, 2
jg 0x499d65
mov edx, dword [esi + 0x5b0]
push edx
push 1
lea eax, [eax + eax*2 + 0x519794]
push 2
push eax
call fcn.004d7af4
mov ecx, dword [esi + 0x5b0]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push ecx
push 1
push edx
push eax
call fcn.004d7af4
add esp, 0x20
mov eax, edi
pop edi
pop esi
ret

Function at 0x499e40
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [esp + 0x10c]
cmp dword [esi + 0xbfc], 0
jne 0x499e64
cmp dword [esi + 0x5b8], 0
je 0x499f40
mov ecx, dword [esp + 0x110]
lea eax, [esp + 0x114]
push eax
push ecx
lea edx, [esp + 0xc]
push 0x100
push edx
call fcn.004a3710
lea eax, [esp + 0x14]
add esp, 0x10
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x499e90
sub eax, edx
mov edx, dword [esi + 0x5b8]
push edi
mov edi, eax
test edx, edx
je 0x499ec7
cmp dword [esi + 0x1230], 0
jne 0x499ec7
lea ecx, [esp + 8]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x499eb3
mov dword [esi + 0x1230], 1
mov byte [esp + edi + 8], 0xa
inc edi
cmp dword [esi + 0xbfc], 0
je 0x499f3f
cmp dword [esi + 0x620], 0
je 0x499f13
push 1
push esi
call fcn.00497a10
mov eax, dword [esi + 0x5b4]
mov edx, dword [esi + 0x620]
push eax
push edi
lea ecx, [esp + 0x18]
push ecx
push 0
push esi
call edx
push 0
push esi
call fcn.00497a10
add esp, 0x24
pop edi
pop esi
add esp, 0x104
ret
mov eax, dword [esi + 0x5b0]
push eax
push 1
push 2
push 0x519794
call fcn.004d7af4
mov ecx, dword [esi + 0x5b0]
push ecx
push 1
lea edx, [esp + 0x20]
push edi
push edx
call fcn.004d7af4
add esp, 0x20
pop edi
pop esi
add esp, 0x104
ret
Function at 0x49a240
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov edx, dword [ebx + 0x5f0]
push ebp
mov ebp, dword [ebx + eax*4 + 0x420]
mov ecx, eax
add ecx, ecx
push esi
lea esi, [ebx + ecx*8 + 0x448]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [edx + 0x40], 3
je 0x49a2e2
cmp dword [ebx + eax*4 + 0x438], 0x499f50
jne 0x49a2e2
cmp dword [esi], 0
je 0x49a27d
test edi, edi
je 0x49a2e2
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.004c1600
add esp, 0x14
cmp eax, 0xffffffff
je 0x49a2e2
test al, 1
je 0x49a2e2
cmp dword [esi], 0
jne 0x49a2cb
mov eax, dword [ebx]
mov eax, dword [eax + 0x97c]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x54ae68]
xor ecx, ecx
add esp, 4
mov dword [esi], eax
cmp eax, ecx
jne 0x49a2c2
pop edi
pop esi
lea eax, [ecx + 0x1b]
pop ebp
ret
mov edi, dword [esi + 4]
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ecx
mov ecx, dword [esi]
add ecx, dword [esi + 8]
push 0
push edi
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x49a2e2
add dword [esi + 8], eax
pop edi
pop esi
xor eax, eax
pop ebp
ret

Function at 0x49a2f0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x100
push ebx
mov ebx, dword [esp + 0x108]
push esi
mov esi, dword [ebx + eax*4 + 0x420]
call fcn.0049a240
test eax, eax
je 0x49a32c
mov eax, dword [esp + 0x11c]
pop esi
mov dword [eax], 0x1b
or eax, 0xffffffff
pop ebx
add esp, 0x100
ret
mov ecx, dword [esp + 0x118]
mov edx, dword [esp + 0x114]
push edi
push 0
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [esp + 0x120]
mov esi, eax
mov dword [edi], 0
cmp esi, 0xffffffff
jne 0x49a3b0
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x49a380
pop ebp
xor esi, esi
mov dword [edi], 0x51
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x100
ret
push 0x100
lea eax, [esp + 0x14]
push eax
push ebp
call fcn.0048f4f0
mov ecx, dword [ebx]
push eax
push str.Send_failure:__s
push ecx
call fcn.00499e40
mov edx, dword [ebx]
add esp, 0x18
mov dword [edx + 0xec4], ebp
mov dword [edi], 0x37
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x100
ret

Function at 0x49e090
Capabilities:
Hash data using djb2

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea edi, [esi + eax]
mov ebx, 0x1505
cmp esi, edi
jae 0x49e0be
movzx eax, byte [esi]
push eax
call fcn.004a28d0
mov edx, ebx
shl edx, 5
movsx ecx, al
add ebx, edx
inc esi
add esp, 4
xor ebx, ecx
cmp esi, edi
jb 0x49e0a1
pop edi
pop esi
movzx eax, bl
pop ebx
ret

Function at 0x49e0d0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
sub esp, 0x14
push esi
mov esi, eax
test esi, esi
je 0x49e11e
lea eax, [esp + 4]
push eax
push esi
push 2
call fcn.004c87b0
add esp, 0xc
test eax, eax
jne 0x49e11e
lea ecx, [esp + 8]
push ecx
push esi
push 0x17
call fcn.004c87b0
add esp, 0xc
test eax, eax
jne 0x49e11e
lea edx, [esp + 4]
push edx
call fcn.0049e030
add esp, 4
mov ecx, eax
mov eax, dword [esp + 4]
pop esi
add esp, 0x14
jmp fcn.0049e090
xor eax, eax
pop esi
add esp, 0x14
ret
Function at 0x4a01e0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
xor eax, eax
cmp dword [esi + 0xc34], eax
push 4
lea ecx, [esp + 4]
push ecx
setne al
push 8
push 0xffff
push edi
mov dword [esp + 0x14], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4a021e
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00499d70
add esp, 0xc
add esp, 0x14
ret
mov edx, dword [esi + 0xb48]
push edx
mov dword [esp + 0xc], 1
call fcn.0049cf80
imul eax, eax, 0x3e8
mov dword [esp + 4], eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0xb4c]
push eax
call fcn.0049cf80
imul eax, eax, 0x3e8
add esp, 8
push 0
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push 0xc
lea edx, [esp + 0x20]
push edx
push 0x98000004
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x4a0297
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.00499d70
add esp, 0x10
add esp, 0x14
ret
Function at 0x4a0b70
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x184
push esi
push 0x80
lea eax, [esp + 0xc]
push 0
push eax
mov dword [esp + 0x10], 0x80
call fcn.004d9310
mov eax, dword [esp + 0x19c]
add esp, 0xc
lea ecx, [esp + 4]
push ecx
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4a0beb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push 0x100
lea ecx, [esp + 0x8c]
mov esi, eax
push ecx
push esi
call fcn.0048f4f0
mov edx, dword [esp + 0x198]
push eax
mov eax, dword [edx]
push esi
push str.getsockname___failed_with_errno__d:__s
push eax
call fcn.00499e40
add esp, 0x1c
pop esi
add esp, 0x184
ret
mov eax, dword [esp + 4]
push ebx
mov ebx, dword [esp + 0x190]
lea ecx, [ebx + 0x3d4]
push ecx
lea edx, [ebx + 0x3a4]
push edx
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.004a09c0
add esp, 0x10
test eax, eax
jne 0x4a0c50
push edi
call fcn.004ddbbd
mov esi, eax
call fcn.004ddbbd
push 0x100
lea edx, [esp + 0x94]
mov edi, eax
mov eax, dword [esi]
push edx
push eax
call fcn.0048f4f0
mov ecx, dword [edi]
mov edx, dword [ebx]
push eax
push ecx
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.00499e40
add esp, 0x1c
pop edi
pop ebx
pop esi
add esp, 0x184
ret

Function at 0x4a0e30
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x104
push esi
mov esi, dword [eax]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x4a0e7c
push 0x100
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.0048f4f0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00499d70
add esp, 0x18
pop esi
add esp, 0x104
ret

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

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x474], 0
je 0x4a0fed
push eax
call fcn.00491550
add esp, 4
test eax, eax
jne 0x4a100d
xor eax, eax
ret
mov eax, dword [eax + 0x420]
cmp eax, 0xffffffff
je 0x4a0fea
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4a100d
ret
mov eax, 1
ret
Function at 0x4a4320
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x18]
mov dword [eax], 0
mov eax, dword [esp + 0x1c]
push edx
push eax
push ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], 0
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 4], eax
test eax, eax
jne 0x4a44d9
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4a44b6
push ebx
push ebp
mov eax, dword [edi + 0x14]
test eax, eax
je 0x4a438e
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a4380
sub eax, edx
lea ebx, [eax + 1]
jmp 0x4a4390
xor ebx, ebx
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x4a439d
lea ebp, [eax + 0xe]
jmp 0x4a43a9
cmp eax, 0x17
jne 0x4a4443
lea ebp, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x4a4443
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4a4443
cmp eax, ebp
jb 0x4a4443
lea edx, [ebx + ebp + 0x20]
push edx
call dword [0x54ae68]
mov esi, eax
xor eax, eax
add esp, 4
cmp esi, eax
je 0x4a4450
mov ecx, dword [edi]
mov dword [esi], ecx
mov edx, dword [edi + 4]
mov dword [esi + 4], edx
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x14], eax
mov dword [esi + 0x1c], eax
lea eax, [esi + 0x20]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], ebp
mov dword [esi + 0x18], eax
mov ecx, dword [edi + 0x18]
push ebp
push ecx
push eax
call fcn.004d9440
add esp, 0xc
test ebx, ebx
je 0x4a4429
mov eax, dword [esi + 0x18]
add eax, ebp
mov dword [esi + 0x14], eax
mov ecx, dword [edi + 0x14]
push ebx
push ecx
push eax
call fcn.004d9440
add esp, 0xc
cmp dword [esp + 0x10], 0
jne 0x4a4434
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4a443f
mov dword [eax + 0x1c], esi
mov dword [esp + 0x18], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x4a4373
jmp 0x4a4458
mov dword [esp + 0x14], 8
mov eax, dword [esp + 0x1c]
pop ebp
pop ebx
test eax, eax
je 0x4a4469
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [esp + 0xc], 0
je 0x4a44af
mov eax, dword [esp + 8]
test eax, eax
je 0x4a4493
jmp 0x4a4480
mov esi, dword [eax + 0x1c]
push eax
call dword [0x54ae6c]
add esp, 4
mov eax, esi
test esi, esi
jne 0x4a4480
mov eax, dword [esp + 0x28]
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
pop edi
mov dword [eax], edx
mov eax, dword [esp + 8]
pop esi
add esp, 0x10
ret
cmp dword [esp + 8], 0
jne 0x4a44c9
push 0x2af9
mov dword [esp + 0x10], 0x2af9
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 8]
pop edi
mov dword [eax], edx
mov eax, dword [esp + 8]
pop esi
add esp, 0x10
ret