joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f9c80
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x14
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
add ecx, 6
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x28]
mov ebp, 1
shl ebp, cl
xor ecx, ecx
mov dword [eax], 0
mov dword [esp + 0x14], ebp
test dword [edi + 0x80], 0xfffffffc
mov dword [esp + 0x10], ecx
jbe 0x4f9df8
lea ecx, [ecx]
mov eax, dword [edi + 0x7c]
xor ebx, ebx
test eax, eax
je 0x4f9de0
shr ecx, 2
mov dword [esp + 0x1c], ecx
lea edx, [ecx + 1]
mov dword [esp + 0x20], edx
jmp 0x4f9ce0
lea ecx, [eax + 2]
mov eax, dword [edi + 0x78]
imul ecx, edx
xor edx, edx
add ecx, ebx
cmp dword [eax + ecx*4 + 4], edx
sete dl
xor esi, esi
mov dword [esp + 0x18], edx
test edx, edx
je 0x4f9d7c
mov eax, dword [edi + 0x8c]
mov ecx, dword [edi + 0x74]
mov edi, dword [esp + 0x14]
lea ebp, [eax*4]
imul eax, dword [esp + 0x10]
add eax, ebx
lea ecx, [ecx + eax*4]
lea esp, [esp]
mov eax, dword [ecx]
cdq
xor eax, edx
sub eax, edx
test edi, eax
jne 0x4f9d33
inc esi
add ecx, ebp
cmp esi, 4
jb 0x4f9d20
mov edi, dword [esp + 0x28]
lea eax, [edi + 0x60]
mov dword [edi + 0x68], eax
xor eax, eax
cmp esi, 4
setne al
push eax
push edi
call fcn.004fca30
add esp, 8
cmp esi, 4
je 0x4f9dc8
lea eax, [edi + 0x64]
mov dword [edi + 0x68], eax
mov eax, esi
shr eax, 1
push eax
push edi
call fcn.004fca30
mov eax, esi
and eax, 1
push eax
push edi
call fcn.004fca30
mov edx, dword [esp + 0x28]
add esp, 0x10
mov ebp, dword [esp + 0x14]
push dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
mov eax, dword [edi + 0x74]
add ecx, esi
imul ecx, dword [edi + 0x8c]
push 4
push esi
push edx
push dword [esp + 0x40]
add ecx, ebx
push ebp
push dword [esp + 0x44]
lea eax, [eax + ecx*4]
mov ecx, dword [edi + 0x7c]
push eax
mov eax, dword [esp + 0x3c]
add ecx, 2
inc eax
imul ecx, eax
mov eax, dword [edi + 0x78]
add ecx, ebx
lea eax, [eax + ecx*4]
add eax, 4
push eax
push edi
call fcn.004f9e80
add esp, 0x28
jmp 0x4f9dcc
mov ebp, dword [esp + 0x14]
mov eax, dword [edi + 0x7c]
inc ebx
mov edx, dword [esp + 0x20]
cmp ebx, eax
jb 0x4f9ce0
mov ecx, dword [esp + 0x10]
mov eax, dword [edi + 0x80]
add ecx, 4
and eax, 0xfffffffc
mov dword [esp + 0x10], ecx
cmp ecx, eax
jb 0x4f9cc0
cmp ecx, dword [edi + 0x80]
jae 0x4f9e73
mov edx, dword [edi + 0x7c]
xor esi, esi
test edx, edx
je 0x4f9e73
mov eax, ecx
shr eax, 2
lea ebx, [eax*4 + 4]
jmp 0x4f9e20
push dword [esp + 0x34]
mov eax, dword [edi + 0x80]
sub eax, ecx
mov ecx, dword [edi + 0x8c]
imul ecx, dword [esp + 0x14]
push eax
mov eax, dword [edi + 0x74]
push 0
push 0
push dword [esp + 0x40]
add ecx, esi
push ebp
push dword [esp + 0x44]
lea eax, [eax + ecx*4]
push eax
lea eax, [edx + 2]
imul eax, ebx
lea eax, [eax + esi*4]
add eax, 4
add eax, dword [edi + 0x78]
push eax
push edi
call fcn.004f9e80
mov edx, dword [edi + 0x7c]
inc esi
mov ecx, dword [esp + 0x38]
add esp, 0x28
cmp esi, edx
jb 0x4f9e20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x4fd910
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x4fd93f
push esi
call fcn.004fdaf0
add esp, 4
cmp byte [esi + 0x40], 0
je 0x4fd938
mov dword [esi + 0x14], 0xcf
mov al, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
push edi
cmp eax, 0xcb
jne 0x4fd9c2
mov eax, dword [esi + 0x1a8]
cmp byte [eax + 0x10], 0
je 0x4fd9ad
mov eax, dword [esi + 8]
test eax, eax
je 0x4fd965
mov eax, dword [eax]
push esi
call eax
add esp, 4
mov eax, dword [esi + 0x1a8]
push esi
mov eax, dword [eax]
call eax
add esp, 4
test eax, eax
je 0x4fd9a8
cmp eax, 2
je 0x4fd9ad
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4fd956
cmp eax, 3
je 0x4fd98d
cmp eax, 1
jne 0x4fd956
inc dword [ecx + 4]
mov edx, dword [esi + 8]
mov edi, dword [edx + 8]
cmp dword [ecx + 4], edi
jl 0x4fd956
mov eax, dword [esi + 0x128]
add eax, edi
mov dword [edx + 8], eax
jmp 0x4fd956
pop edi
xor al, al
pop esi
ret
mov eax, dword [esi + 0x7c]
push esi
mov dword [esi + 0x84], eax
call fcn.004fd9f0
add esp, 4
pop edi
pop esi
ret
cmp eax, 0xcc
je 0x4fd9e4
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
push esi
call fcn.004fd9f0
add esp, 4
pop edi
pop esi
ret

Function at 0x4fd9f0
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0xcc
je 0x4fda1c
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
add esp, 4
mov dword [esi + 0x78], 0
mov dword [esi + 0x14], 0xcc
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
je 0x4fdaa2
lea ebx, [esi + 0x78]
jmp 0x4fda30
mov eax, dword [ebx]
cmp eax, dword [esi + 0x60]
jae 0x4fda76
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4fda55
mov dword [ecx + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x60]
push esi
mov dword [ecx + 8], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0x19c]
mov edi, dword [ebx]
push 0
push ebx
mov eax, dword [eax + 4]
push 0
push esi
call eax
mov eax, dword [ebx]
add esp, 0x10
cmp eax, edi
je 0x4fdab8
cmp eax, dword [esi + 0x60]
jb 0x4fda37
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi + 0x198]
push esi
mov eax, dword [eax]
call eax
mov dword [ebx], 0
add esp, 8
mov eax, dword [esi + 0x198]
cmp byte [eax + 8], 0
jne 0x4fda30
xor eax, eax
cmp byte [esi + 0x41], al
pop edi
setne al
add eax, 0xcd
mov dword [esi + 0x14], eax
mov al, 1
pop esi
pop ebx
ret
pop edi
pop esi
xor al, al
pop ebx
ret
Function at 0x4fec30
Capabilities:
Query environment variable

Disassembly:
push ecx
push esi
push edi
mov edi, dword [esp + 0x10]
push edi
mov dword [edi + 4], 0
call fcn.0050ae50
push 0x54
push edi
mov dword [esp + 0x14], eax
call fcn.0050ae20
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4fec77
push edi
call fcn.0050ae60
mov ecx, dword [edi]
push edi
mov dword [ecx + 0x14], 0x38
mov ecx, dword [edi]
mov dword [ecx + 0x18], esi
mov eax, dword [edi]
mov eax, dword [eax]
call eax
add esp, 8
mov dword [esi], fcn.004fe8c0
mov dword [esi + 4], fcn.004fe750
mov dword [esi + 8], fcn.004fe820
mov dword [esi + 0xc], fcn.004fe6a0
mov dword [esi + 0x10], 0x4fef90
mov dword [esi + 0x14], 0x4fef20
mov dword [esi + 0x18], 0x4fed80
mov dword [esi + 0x1c], 0x4fe550
mov dword [esi + 0x20], 0x4fe400
mov dword [esi + 0x24], 0x4feb30
mov dword [esi + 0x28], 0x4ff000
mov dword [esi + 0x30], 0x3b9aca00
mov eax, dword [esp + 8]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x38], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0x54
push str.JPEGMEM
mov dword [edi + 4], esi
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
test eax, eax
je 0x4fed5a
lea ecx, [esp + 0x10]
mov byte [esp + 0x10], 0x78
push ecx
lea ecx, [esp + 0xc]
push ecx
push str._ld_c
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
add esp, 0x10
test eax, eax
jle 0x4fed5a
mov al, byte [esp + 0x10]
cmp al, 0x6d
je 0x4fed49
cmp al, 0x4d
mov eax, dword [esp + 8]
jne 0x4fed51
imul eax, dword [esp + 8], 0x3e8
imul eax, eax, 0x3e8
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ecx
ret
Function at 0x502520
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
cmp dword [ebp + 0x4c], 1
mov ebx, dword [ebp + 0x1c0]
mov dword [esp + 0x1c], ebx
jne 0x502545
mov esi, 0x1fe
mov byte [ebx + 0x1c], 1
jmp 0x50254b
xor esi, esi
mov byte [ebx + 0x1c], 0
push dword [ebp + 0x64]
mov ecx, dword [ebp + 4]
lea eax, [esi + 0x100]
push eax
push 1
push ebp
mov eax, dword [ecx + 8]
mov dword [esp + 0x20], esi
call eax
xor ecx, ecx
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
add esp, 0x10
mov dword [esp + 0x14], ecx
cmp dword [ebp + 0x64], ecx
jle 0x502660
push edi
lea ecx, [ecx]
mov edi, dword [ebx + ecx*4 + 0x20]
cdq
idiv edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], eax
test esi, esi
je 0x50259d
mov eax, dword [ebx + 0x18]
add dword [eax + ecx*4], 0xff
mov eax, dword [ebx + 0x18]
xor ebx, ebx
mov ebp, dword [eax + ecx*4]
lea eax, [edi + 0xfe]
lea ecx, [edi*2 - 2]
cdq
idiv ecx
xor esi, esi
mov edx, eax
lea esp, [esp]
cmp esi, edx
jle 0x5025f6
mov ecx, dword [esp + 0x10]
lea edi, [edi*2 - 2]
imul eax, ebx, 0x1fe
add ecx, 0xfe
add ecx, eax
lea ecx, [ecx]
add ecx, 0x1fe
inc ebx
mov eax, ecx
cdq
idiv edi
mov edx, eax
cmp esi, edx
jg 0x5025e0
mov edi, dword [esp + 0x10]
mov al, byte [esp + 0x1c]
imul bl
mov byte [esi + ebp], al
inc esi
cmp esi, 0xff
jle 0x5025c0
mov esi, dword [esp + 0x14]
test esi, esi
je 0x502641
mov ecx, 1
lea edx, [ebp - 1]
jmp 0x502620
movzx eax, byte [ebp]
lea edx, [edx - 1]
mov byte [edx + 1], al
movzx eax, byte [ebp + 0xff]
mov byte [ecx + ebp + 0xff], al
inc ecx
cmp ecx, 0xff
jle 0x502620
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [eax + 0x64]
mov eax, dword [esp + 0x1c]
jl 0x502580
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x51fa50
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ebx, 0x1505
add ecx, esi
mov eax, ecx
push edi
xor edi, edi
sub eax, esi
cmp ecx, esi
sbb ebp, ebp
not ebp
and ebp, eax
jbe 0x51fa94
mov al, byte [esi]
push eax
call fcn.0052bba0
movsx ecx, al
lea esi, [esi + 1]
mov eax, ebx
inc edi
shl eax, 5
add esp, 4
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp edi, ebp
jb 0x51fa73
pop edi
pop esi
pop ebp
movzx eax, bl
pop ebx
ret
Function at 0x522950
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x52296a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x57ddac
push esi
call dword [sym.imp.MSVCRT.dll_strpbrk]
add esp, 8
test eax, eax
je 0x5229b3
test ebp, ebp
je 0x5229a4
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x5229d9
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x5229d9
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x522a8f
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x5229f6
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0x5a4fc0]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x522a85
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x522a85
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x522a28
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x522a40
sub ecx, edx
add ecx, ebx
sub ecx, esi
lea ecx, [ecx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x522a50
test ebp, ebp
je 0x522a7c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x5a4fc4]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x5a4fc4]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x522c20
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x22c
test byte [esp + 0x230], 2
je 0x522c6b
lea eax, [esp + 0x9c]
push eax
push 0x202
call dword [sym.imp.WSOCK32.DLL_WSAStartup]
test eax, eax
jne 0x522c5f
mov eax, dword [esp + 0x9c]
cmp al, 2
jne 0x522c59
shr eax, 8
cmp al, 2
je 0x522c6b
call dword [sym.imp.WSOCK32.DLL_WSACleanup]
mov eax, 2
add esp, 0x22c
ret
call fcn.0053c5e0
test eax, eax
jne 0x522d40
push 0x57dd70
call fcn.00522950
add esp, 4
mov dword [0x5aaa40], eax
test eax, eax
je 0x522ca3
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x522ca3
mov dword [0x5aaa3c], eax
push esi
push 0x9c
lea eax, [esp + 8]
push 0
push eax
call sub.MSVCRT.dll_memset
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
mov dword [esp + 4], 0x9c
mov dword [esp + 8], 6
mov dword [esp + 0xc], 0
push 3
push 2
push 0
push 0
mov dword [esp + 0x24], 2
call esi
push 3
push 1
push edx
push eax
call esi
push 3
push 0x20
push edx
push eax
call esi
push 3
push 0x10
push edx
push eax
call esi
push 1
push 8
push edx
push eax
call esi
push edx
push eax
push 0x33
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
pop esi
test eax, eax
je 0x522d37
push 0x5ab3b0
mov byte [0x5ab3b8], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add esp, 0x22c
ret
mov byte [0x5ab3b8], 0
xor eax, eax
add esp, 0x22c
ret

Function at 0x522ec0
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x2c8], 2
je fcn.00522e70
mov al, 1
ret

Function at 0x523000
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
cmp dword [edi + 0x5e0], 0
je 0x523044
push 1
push edi
call fcn.00524200
push dword [edi + 0x574]
mov eax, dword [edi + 0x5e0]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.00524200
add esp, 0x24
mov eax, esi
pop edi
pop esi
ret
mov eax, dword [esp + 0x10]
cmp eax, 2
ja 0x52307d
push dword [edi + 0x570]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
lea eax, [eax + eax*2]
push 1
add eax, 0x57de30
push 2
push eax
call esi
push dword [edi + 0x570]
push 1
push dword [esp + 0x30]
push dword [esp + 0x30]
call esi
add esp, 0x20
pop edi
xor eax, eax
pop esi
ret

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

Disassembly:
push 0
push dword [esp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x10]
call dword [sym.imp.WSOCK32.DLL_recv]
mov ecx, eax
cmp ecx, 0xffffffff
jne 0x5232b1
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov eax, dword [esp + 0x10]
mov dword [eax], ecx
xor eax, eax
ret
Function at 0x5233e0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x80
push ebx
push ebp
mov ebp, dword [esp + 0x8c]
push esi
push eax
push ebp
mov esi, dword [ebp + eax*4 + 0x1a4]
call fcn.00523890
add esp, 8
push 0
push dword [esp + 0xa0]
push dword [esp + 0xa0]
push esi
call dword [sym.imp.WSOCK32.DLL_send]
mov ebx, dword [esp + 0xa0]
mov esi, eax
mov dword [ebx], 0
cmp esi, 0xffffffff
jne 0x523487
push edi
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov edi, eax
cmp edi, 0x2733
jne 0x523454
pop edi
pop esi
pop ebp
mov dword [ebx], 0x51
xor eax, eax
pop ebx
add esp, 0x80
ret
push pe_nt_image_headers32
lea eax, [esp + 0x14]
push eax
push edi
call fcn.0053d1a0
push eax
push str.Send_failure:__s
push dword [ebp]
call fcn.00523090
mov eax, dword [ebp]
add esp, 0x18
mov dword [eax + 0xc54], edi
mov eax, esi
mov dword [ebx], 0x37
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret

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

Disassembly:
mov ecx, dword [esp + 8]
mov eax, ecx
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
shl eax, 4
mov ebp, dword [ebx + ecx*4 + 0x1a4]
lea esi, [ebx + 0x1c8]
add esi, eax
mov eax, dword [ebx + 0x2c0]
push edi
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x523946
cmp dword [ebx + ecx*4 + 0x1b8], 0x523310
jne 0x523946
cmp dword [esi], 0
je 0x5238dc
test edi, edi
je 0x523946
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.0052b3a0
add esp, 0x10
cmp eax, 0xffffffff
je 0x523946
test al, 1
je 0x523946
cmp dword [esi], 0
jne 0x52392f
mov eax, dword [ebx]
mov eax, dword [eax + 0x8d0]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x5a4fc0]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test eax, eax
jne 0x52392f
pop edi
mov dword [esi + 4], eax
pop esi
pop ebp
pop ebx
ret
mov eax, dword [esi]
add eax, dword [esi + 8]
push 0
push edi
push eax
push ebp
call dword [sym.imp.WSOCK32.DLL_recv]
test eax, eax
jle 0x523946
add dword [esi + 8], eax
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x52a200
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x188
push ebx
mov ebx, dword [esp + 0x190]
cmp dword [ebx + 0x90], 3
jne 0x52a3d8
cmp byte [ebx + 0x289], 0
push ebp
push esi
push edi
jne 0x52a3cc
cmp byte [ebx + 0x2a1], 0
jne 0x52a3cc
mov esi, dword [esp + 0x1a0]
lea eax, [esp + 0x10]
mov ebp, dword [ebx]
push eax
lea eax, [esp + 0x11c]
mov dword [esp + 0x14], pe_nt_image_headers32
push eax
push esi
call dword [sym.imp.WSOCK32.DLL_getpeername]
test eax, eax
je 0x52a294
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x18]
push pe_nt_image_headers32
push eax
push esi
call fcn.0053d1a0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.00523090
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
push pe_nt_image_headers32
lea eax, [esp + 0x9c]
mov dword [esp + 0x18], pe_nt_image_headers32
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x9c]
push eax
push esi
call dword [sym.imp.WSOCK32.DLL_getsockname]
test eax, eax
je 0x52a2fe
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x18]
push pe_nt_image_headers32
push eax
push esi
call fcn.0053d1a0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.00523090
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
push esi
push dword [esp + 0x18]
lea eax, [esp + 0x124]
push eax
call fcn.00529620
add esp, 0x10
test al, al
jne 0x52a35f
mov esi, dword [sym.imp.MSVCRT.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
lea eax, [esp + 0x18]
push pe_nt_image_headers32
push eax
push dword [edi]
call fcn.0053d1a0
push eax
push dword [esi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00523090
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
lea edi, [ebx + 0x5c]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0xa4]
movsw word es:[edi], word [esi]
push eax
call fcn.00529620
add esp, 0x10
test al, al
jne 0x52a3cc
mov esi, dword [sym.imp.MSVCRT.dll__errno]
call esi
mov edi, eax
call esi
mov esi, eax
lea eax, [esp + 0x18]
push pe_nt_image_headers32
push eax
push dword [edi]
call fcn.0053d1a0
push eax
push dword [esi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00523090
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
push ebx
call fcn.00529ee0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
Function at 0x52ad30
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x10
push esi
mov esi, dword [esp + 0x18]
xor eax, eax
push edi
mov edi, dword [esp + 0x20]
push 4
cmp byte [esi + 0xa9f], al
setne al
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push 8
push 0xffff
push edi
call dword [sym.imp.WSOCK32.DLL_setsockopt]
test eax, eax
jns 0x52ad7a
push edi
push str.Failed_to_set_SO_KEEPALIVE_on_fd__d_n
push esi
call fcn.00523150
add esp, 0xc
pop edi
pop esi
add esp, 0x10
ret
push dword [esi + 0xa3c]
mov dword [esp + 0x10], 1
call fcn.005295a0
push dword [esi + 0xa40]
imul eax, eax, 0x3e8
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], eax
call fcn.005295a0
add esp, 8
imul eax, eax, 0x3e8
push 0
push 0
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0x24]
push eax
push 0x98000004
push edi
call dword [sym.imp.WS2_32.DLL_WSAIoctl]
test eax, eax
je 0x52adf1
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
push eax
push edi
push str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d_n
push esi
call fcn.00523150
add esp, 0x10
pop edi
pop esi
add esp, 0x10
ret

Function at 0x52ae00
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x84
mov eax, dword [esp + 0x88]
push esi
push 4
mov dword [esp + 8], 1
mov esi, dword [eax]
lea eax, [esp + 8]
push eax
push 1
push 6
push dword [esp + 0xa0]
call dword [sym.imp.WSOCK32.DLL_setsockopt]
test eax, eax
jns 0x52ae61
push pe_nt_image_headers32
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
push eax
call fcn.0053d1a0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.00523150
add esp, 0x18
pop esi
add esp, 0x84
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.00523150
add esp, 8
pop esi
add esp, 0x84
ret
Function at 0x535b90
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1000
call fcn.0042e370
push dword [esp + 0x1004]
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x535bdd
push 0x1000
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x535bdd
lea eax, [esp]
push eax
call dword [0x5a4fcc]
add esp, 4
add esp, 0x1000
ret
xor eax, eax
add esp, 0x1000
ret
Function at 0x53c680
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebp
xor ebp, ebp
mov dword [esp + 4], ebp
mov dword [eax], ebp
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.DLL_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x53c813
push ebx
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x53c7fd
push esi
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x53c6cf
lea ebx, [eax + 0xe]
jmp 0x53c6db
cmp eax, 0x17
jne 0x53c78a
lea ebx, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x53c78a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x53c78a
cmp eax, ebx
jb 0x53c78a
push 0x20
call dword [0x5a4fc0]
mov esi, eax
add esp, 4
test esi, esi
je 0x53c7f2
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push ebx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x5a4fc0]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x53c7e1
push ebx
push dword [edi + 0x18]
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x53c775
push eax
call dword [0x5a4fcc]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x53c7c7
test ebp, ebp
jne 0x53c77b
mov ebp, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x53c786
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x53c6c2
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
je 0x53c7a9
push eax
call dword [sym.imp.WS2_32.DLL_freeaddrinfo]
test ebx, ebx
je 0x53c7f9
push ebp
call fcn.0053c640
mov eax, dword [esp + 0x2c]
add esp, 4
xor ebp, ebp
mov dword [eax], ebp
mov eax, ebx
pop edi
pop ebx
pop ebp
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebx, 8
call dword [0x5a4fc4]
push esi
call dword [0x5a4fc4]
add esp, 8
jmp 0x53c799
push esi
mov ebx, 8
call dword [0x5a4fc4]
add esp, 4
jmp 0x53c799
mov ebx, 8
jmp 0x53c799
test ebp, ebp
jne 0x53c809
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WSOCK32.DLL_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], ebp
mov eax, ebx
pop ebx
pop ebp
add esp, 0xc
ret