joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4950e0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x194
mov eax, dword [0x578704]
xor eax, ebp
mov dword [ebp - 4], eax
test byte [ebp + 8], 2
je 0x495139
lea eax, [ebp - 0x194]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x495126
mov eax, dword [ebp - 0x194]
cmp al, 2
jne 0x495120
shr eax, 8
cmp al, 2
je 0x495139
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
call fcn.004c4ee0
test eax, eax
jne 0x49519d
push str.iphlpapi.dll
call fcn.00494f40
add esp, 4
mov dword [0x57dc98], eax
test eax, eax
je 0x495175
push str.if_nametoindex
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov ecx, dword [0x57dc94]
test eax, eax
cmovne ecx, eax
mov dword [0x57dc94], ecx
push 3
push 2
push 0
push 0
push 6
call fcn.004c4ae0
add esp, 0x14
test al, al
setne byte [0x57fc4c]
push 0x57fc50
call dword [sym.imp.KERNEL32.DLL_QueryPerformanceFrequency]
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret

Function at 0x497f40
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x578704]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x497f87
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jg 0x497f87
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004e1d28
mov esp, ebp
pop ebp
ret

Function at 0x497fa0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x497fbe
cmp dword [esi + 0x78], 0
je 0x497fbe
push 2
push 3
push esi
call fcn.004973c0
add esp, 0xc
push dword [ebp + 0xc]
call fcn.00497a20
add esp, 4
test esi, esi
je 0x497fde
cmp dword [esi + 0x78], 0
je 0x497fde
push 3
push esi
call fcn.00497400
add esp, 8
pop esi
pop ebp
ret

Function at 0x4980e0
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x498123
mov eax, dword [esi + 0x70]
cmp byte [eax + 0xf8], 0
jne 0x498111
push 0
call fcn.004980e0
add esp, 4
test al, al
mov eax, dword [esi + 0x70]
setne cl
inc cl
mov byte [eax + 0xf8], cl
mov ecx, dword [esi + 0x70]
xor eax, eax
pop esi
cmp byte [ecx + 0xf8], 2
sete al
pop ebp
ret
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x498141
xor esi, esi
xor eax, eax
cmp eax, esi
pop esi
sbb eax, eax
neg eax
pop ebp
ret
push eax
mov esi, 1
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
cmp eax, esi
pop esi
sbb eax, eax
neg eax
pop ebp
ret
Function at 0x498e60
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x498e70
push dword [ebp + 8]
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x14], xmm0
sub esi, ecx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
lea eax, [ebp - 4]
push eax
push str.127.0.0.1
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jge 0x498eb4
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
lea eax, [esi + 0x31]
push 1
push eax
call dword [0x578358]
mov esi, eax
add esp, 8
test esi, esi
je 0x498eac
movups xmm0, xmmword [ebp - 0x14]
lea eax, [esi + 0x20]
mov dword [esi], 0
mov dword [esi + 0x18], eax
mov edx, edi
mov dword [esi + 4], 2
mov dword [esi + 8], 1
mov dword [esi + 0xc], 6
mov dword [esi + 0x10], 0x10
movups xmmword [eax], xmm0
mov ecx, dword [esi + 0x18]
add ecx, 0x10
mov dword [esi + 0x14], ecx
nop dword [eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x498f10
push edi
push dword [ebp + 8]
call fcn.00498f40
add esp, 8
mov dword [esi + 0x1c], eax
mov eax, esi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x498f40
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x578704]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
mov ecx, esi
push edi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x498f60
sub ecx, edx
push 1
lea eax, [ecx + 0x3d]
push eax
call dword [0x578358]
mov edi, eax
add esp, 8
test edi, edi
jne 0x498f90
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
mov eax, 0x17
mov word [ebp - 0x30], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x2e], ax
lea eax, [ebp - 0x14]
push eax
push 0x53dbe8
push 0x17
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
jl 0x498f7e
movups xmm0, xmmword [ebp - 0x14]
push 0x1c
lea ecx, [ebp - 0x30]
mov dword [edi], 0
lea eax, [edi + 0x20]
mov dword [edi + 4], 0x17
push ecx
push eax
movups xmmword [ebp - 0x28], xmm0
mov dword [edi + 8], 1
mov dword [edi + 0xc], 6
mov dword [edi + 0x10], 0x1c
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
call fcn.004faeb0
mov ecx, dword [edi + 0x18]
add esp, 0xc
add ecx, 0x1c
mov dword [edi + 0x14], ecx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x499020
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
Function at 0x4a27e0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4a27fb
cmp dword [edi], 0
jne 0x4a280d
test esi, esi
je 0x4a2804
cmp dword [esi], 0
jne 0x4a280d
test ebx, ebx
je 0x4a2856
cmp dword [ebx], 0
je 0x4a2856
push dword [ebp + 0x1c]
lea eax, [ebp - 8]
push dword [ebp + 0x18]
push eax
call fcn.004c9950
add esp, 0xc
test ebx, ebx
je 0x4a2828
cmp dword [ebx], 0
jne 0x4a282a
xor ebx, ebx
test esi, esi
je 0x4a2833
cmp dword [esi], 0
jne 0x4a2835
xor esi, esi
test edi, edi
je 0x4a283e
cmp dword [edi], 0
jne 0x4a2840
xor edi, edi
push eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
mov eax, ecx
mov edx, dword [ebp + 0x1c]
or eax, edx
mov dword [ebp - 4], edx
je 0x4a28a2
test edx, edx
jg 0x4a288f
jl 0x4a286f
test ecx, ecx
jae 0x4a2884
push 0x2726
call dword [sym.imp.WS2_32.dll_WSASetLastError]
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jl 0x4a289b
jg 0x4a288f
cmp ecx, 0xffffffff
jb 0x4a289b
mov ecx, 0xfffffffe
mov dword [ebp - 4], 0
push ecx
call dword [sym.imp.KERNEL32.DLL_Sleep]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4a5fe0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.00487840
push dword [ebp + 8]
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x10], xmm0
call fcn.004a40d0
push dword [ebp + 0xc]
mov edi, eax
call fcn.004a40d0
mov ebx, dword [sym.imp.KERNEL32.DLL_MoveFileExW]
add esp, 0xc
mov esi, eax
push 1
push esi
push edi
call ebx
test eax, eax
jne 0x4a6067
lea eax, [ebp - 0x20]
push eax
call fcn.00487840
movups xmm0, xmmword [ebp - 0x10]
sub esp, 0xc
mov ecx, esp
sub esp, 0x10
movups xmmword [ecx], xmm0
mov ecx, esp
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
call fcn.004878e0
add esp, 0x20
test edx, edx
ja 0x4a608a
jb 0x4a6055
cmp eax, 0x3e8
ja 0x4a608a
push 1
call dword [sym.imp.KERNEL32.DLL_Sleep]
push 1
push esi
push edi
call ebx
test eax, eax
je 0x4a6020
test edi, edi
je 0x4a6074
push edi
call fcn.004fe626
add esp, 4
test esi, esi
je 0x4a6081
push esi
call fcn.004fe626
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4a6097
push edi
call fcn.004fe626
add esp, 4
test esi, esi
je 0x4a60a4
push esi
call fcn.004fe626
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a6490
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [eax], ebx
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a6627
push esi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x4a6613
push edi
nop dword [eax]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a64ee
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a64e0
sub eax, edx
lea ecx, [eax + 1]
jmp 0x4a64f0
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], ecx
cmp eax, 2
jne 0x4a6502
mov eax, 0x10
jmp 0x4a6510
cmp eax, 0x17
jne 0x4a65b5
mov eax, 0x1c
cmp dword [esi + 0x18], 0
mov dword [ebp - 4], eax
je 0x4a65b5
mov edx, dword [esi + 0x10]
test edx, edx
je 0x4a65b5
cmp edx, eax
jb 0x4a65b5
add ecx, 0x20
add eax, ecx
push eax
call dword [0x578348]
mov edi, eax
add esp, 4
test edi, edi
je 0x4a6605
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 8]
mov dword [edi + 8], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 4]
mov dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.004faeb0
mov edx, dword [ebp - 0xc]
add esp, 0xc
test edx, edx
je 0x4a65a3
mov eax, dword [edi + 0x18]
add eax, dword [ebp - 4]
push edx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.004faeb0
add esp, 0xc
mov eax, dword [ebp - 0x10]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x4a65b2
mov dword [eax + 0x1c], edi
mov dword [ebp - 0x10], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4a64d0
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
pop edi
test eax, eax
je 0x4a65d2
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4a660f
test ebx, ebx
je 0x4a65f6
nop word [eax + eax]
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x57834c]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x4a65e0
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 8
mov dword [ebp - 8], esi
jmp 0x4a65c3
test ebx, ebx
jne 0x4a661f
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a6840
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x578704]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4a6886
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push esi
push eax
push 2
call fcn.004a6770
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4a68b8
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push esi
push eax
push 0x17
call fcn.004a6770
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004e1d28
mov esp, ebp
pop ebp
ret

Function at 0x4a6a20
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call fcn.004fe593
add esp, 0x18
test eax, eax
je 0x4a6a42
cmp eax, 0xffffffff
jne 0x4a6a44
xor eax, eax
pop ebp
ret

Function at 0x4a6a90
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, 0x2b
test edi, edi
je 0x4a6b37
mov esi, dword [ebp + 0xc]
nop dword [eax]
push 4
lea eax, [ebp + 0x10]
mov ebx, 4
push eax
push dword [ebp + 8]
cmp edi, ebx
cmovb ebx, edi
call fcn.0048cc90
add esp, 0xc
cmp eax, 4
jne 0x4a6af5
cmp byte [0x57dca0], 0
jne 0x4a6b00
push 2
push eax
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x4a6b39
mov eax, dword [ebp + 0x10]
jmp 0x4a6b1c
imul eax, dword [0x57dc9c], 0x41c64e6d
add eax, 0x3039
mov dword [0x57dc9c], eax
rol eax, 0x10
xor ecx, ecx
mov dword [ebp + 0x10], eax
test ebx, ebx
je 0x4a6b2f
mov byte [esi], al
dec edi
inc esi
shr eax, 8
sub ebx, 1
jne 0x4a6b20
mov dword [ebp + 0x10], eax
test edi, edi
jne 0x4a6ab0
mov eax, ecx
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4a6bf0
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004fb430
add esp, 0xc
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
pop ebp
ret
Function at 0x4a89e0
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 0x14]
push esi
push 0
push dword [ebp + 0x10]
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 4
mov dword [ebp + 0x14], esi
call fcn.004fb430
add esp, 0xc
lea eax, [ebp - 8]
push 0xf0000040
push dword [ebp + 0x18]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4a8aae
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp + 0x1c]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4a8a90
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4a8a90
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4a8a90
cmp esi, dword [ebp - 0xc]
jb 0x4a8a90
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [ebp - 4]
test eax, eax
je 0x4a8a9e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4a8aae
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a9c50
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004a9bc0

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push 0
mov byte [ebp + 0xa], cl
lea ecx, [ebp + 8]
push 3
mov eax, dword [esi + 0xc]
push ecx
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4ab4c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004931f0
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push esi
call fcn.004aad60
add esp, 0x10
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax + 0x124]
mov eax, dword [eax + 0xc]
mov dword [ebp - 4], eax
jne 0x4ab75e
push edi
lea eax, [ebx + 0x1cb4]
lea edi, [ebx + 0x1eb4]
mov dword [edi], eax
cmp eax, edi
jae 0x4ab638
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ab643
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ab64e
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov word [ebp - 0xc], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [ebp - 0x14], ax
cmp ecx, edi
jae 0x4ab67e
mov al, byte [ebp - 0xc]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ab68b
mov al, byte [ebp - 0xb]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ab698
mov al, byte [ebp - 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4ab6a5
mov al, byte [ebp - 0x13]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ab6b0
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4ab6bb
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea ecx, [ebx + 0x1cb4]
mov esi, dword [ebp + 8]
mov dword [ebx + 0x1eb8], eax
sub eax, ecx
sub eax, 2
mov dword [edi], ecx
push eax
lea eax, [ebx + 0x1cb6]
push eax
push 0x3e
push esi
call fcn.004aae70
add esp, 0x10
lea eax, [ebx + 0x1cb4]
push 0
push 3
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4ab71b
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004931f0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb7]
push eax
push esi
call fcn.004ab4e0
add esp, 0xc
lea eax, [ebx + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4ab75c
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004931f0
add esp, 0xc
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4ac730
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x578704]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x378]
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [edi + 0x13c]
push 0
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x130], 0
mov dword [edi + 0x134], eax
jne 0x4ac7bc
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.004faeb0
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [edi + 0x130], eax
mov edx, dword [edi + 0x134]
cmp edx, 4
jge 0x4ac7ef
push str.Received_too_short_packet
push ebx
call fcn.004931f0
add esp, 8
mov dword [edi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x4ac810
jmp dword [ecx*4 + 0x4ac970]
cmp edx, 4
jle case.0x4ac810.4
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x144]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x4ac810.4
lea eax, [edx - 4]
push eax
mov eax, dword [edi + 0x148]
add eax, 4
push eax
push 1
push ebx
call fcn.00493330
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4ac883
push 5
push edi
call fcn.004ad1e0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x134]
sub eax, 4
cdq
add dword [ebx + 0x90], eax
adc dword [ebx + 0x94], edx
push dword [ebx + 0x94]
push dword [ebx + 0x90]
push ebx
call fcn.004a1330
jmp 0x4ac93a
mov eax, dword [edi + 0x148]
lea esi, [edx - 4]
add eax, 4
mov dword [ebp - 0x8c], eax
mov eax, dword [edi + 0x148]
push esi
push dword [ebp - 0x8c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
call fcn.004ad310
add esp, 8
cmp eax, esi
jae case.0x4ac810.4
push dword [ebp - 0x8c]
push str.TFTP_error:__s
push ebx
call fcn.004932b0
jmp 0x4ac93a
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x148]
add eax, 2
push eax
push edi
call fcn.004ac4f0
add esp, 0xc
test eax, eax
je case.0x4ac810.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x55fdec
push ebx
call fcn.004931f0
add esp, 0xc
push ebx
call fcn.004a1670
add esp, 4
test eax, eax
je 0x4ac7dc
push 5
push edi
call fcn.004ad1e0
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.004e1d28
mov esp, ebp
pop ebp
ret
Function at 0x4ad1e0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
cmp edx, 3
ja case.default.0x4ad1f0
jmp dword [edx*4 + 0x4ad244]
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004acca0
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004ac980
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004ad440
push str.TFTP_finished
push 0x55fdec
push ecx
call fcn.004932b0
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x55fdec
push ecx
call fcn.004931f0
add esp, 0xc
mov eax, 0x47
pop ebp
ret