joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a07e0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x59c388]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4a08a9
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call fcn.004bb8d0
add esp, 0xc
test eax, eax
jne 0x4a08a9
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call fcn.004bb8d0
add esp, 0xc
test eax, eax
jne 0x4a08a9
push ebx
push edi
mov edi, esi
xor ebx, ebx
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x4a0833
sub edi, ecx
push edi
push 0x2e
push esi
call fcn.004bb8a0
add esp, 0xc
test eax, eax
je 0x4a0867
sub eax, esi
push eax
push 0x2e
push esi
call fcn.004bb8a0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4a0869
inc ebx
mov ecx, esi
sub ecx, ebx
add edi, ecx
test ebx, ebx
cmovne esi, ebx
mov ebx, 0x1505
add edi, esi
cmp esi, edi
jae 0x4a0895
mov al, byte [esi]
push eax
call fcn.004aff30
movsx ecx, al
inc esi
mov eax, ebx
add esp, 4
shl eax, 5
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp esi, edi
jb 0x4a0877
pop edi
movzx eax, bl
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004f3d68
mov esp, ebp
pop ebp
ret

Function at 0x4a2200
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [0x59c308]
cmp eax, 0xffffffff
jne 0x4a2242
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x4a2228
xor eax, eax
test eax, eax
mov dword [0x59c308], eax
setg al
ret
push eax
push 0
mov dword [0x59c308], 1
call fcn.004acb40
mov eax, dword [0x59c308]
add esp, 8
test eax, eax
setg al
ret

Function at 0x4a2250
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2d0], 2
jne 0x4a22a9
mov eax, dword [0x59c308]
cmp eax, 0xffffffff
jne 0x4a22a2
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x4a2288
xor eax, eax
test eax, eax
mov dword [0x59c308], eax
setg al
pop ebp
ret
push eax
push 0
mov dword [0x59c308], 1
call fcn.004acb40
mov eax, dword [0x59c308]
add esp, 8
test eax, eax
setg al
pop ebp
ret
mov al, 1
pop ebp
ret
Function at 0x4ac030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
cmp dword [edi + 0x1d0], 0
je 0x4ac074
push esi
push 1
push edi
call fcn.0049c3b0
push dword [edi + 0x15c]
mov eax, dword [edi + 0x1d0]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.0049c3b0
add esp, 0x24
mov eax, esi
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 0xc]
mov ecx, edx
sub ecx, 0
je 0x4ac088
sub ecx, 1
je 0x4ac088
sub ecx, 1
jne 0x4ac0b7
push dword [edi + 0x158]
lea eax, [edx*2 + 0x553c28]
push 1
add eax, edx
push 2
push eax
call fcn.0051be7d
push dword [edi + 0x158]
push 1
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0051be7d
add esp, 0x20
xor eax, eax
pop edi
pop ebp
ret

Function at 0x4ac750
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
xor eax, eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, 0x1cc
mov ecx, dword [edi + 0x1ac]
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x1a8]
mov eax, dword [eax + edi]
mov dword [ebp + 8], eax
mov eax, 0x1dc
cmove esi, eax
mov eax, dword [edi + 0x2c8]
add esi, edi
mov ebx, dword [esi + 4]
sub ebx, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x4ac82f
xor eax, eax
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x1bc]
cmp dword [eax + edi], 0x4ac3b0
jne 0x4ac82f
cmp dword [esi], 0
je 0x4ac7bb
test ebx, ebx
je 0x4ac82f
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004abbc0
add esp, 0x14
cmp eax, 0xffffffff
je 0x4ac82f
test al, 1
je 0x4ac82f
mov ecx, dword [esi]
test ecx, ecx
jne 0x4ac80d
mov eax, dword [edi]
mov eax, dword [eax + 0x4c8]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x59c2b0]
mov ebx, dword [esi + 4]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test ecx, ecx
je 0x4ac828
mov eax, dword [esi + 8]
push 0
push ebx
add eax, ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4ac82f
add dword [esi + 8], eax
jmp 0x4ac82f
mov dword [esi + 4], 0
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4ac896
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x4ac868
mov ecx, dword [ebp + 0x18]
lea eax, [ebx + 0x52]
pop edi
pop esi
pop ebx
mov dword [ecx], 0
pop ebp
ret
push esi
push edi
call fcn.00497e70
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.004ac0c0
mov eax, dword [edi]
add esp, 0x14
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x48dc], esi
mov eax, 0x37
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 0x18]
xor eax, eax
pop edi
pop esi
mov dword [ecx], ebx
pop ebx
pop ebp
ret
Function at 0x4acc20
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1ec], 0
je 0x4acc40
push eax
call fcn.004a4d10
add esp, 4
test eax, eax
jne 0x4acc5e
xor al, al
pop ebp
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x4acc3c
push 2
push 1
lea ecx, [ebp + 0xb]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4acc3c
mov al, 1
pop ebp
ret

Function at 0x4ad4e0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x5a0ab8]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x4ad531
push 3
push 2
push eax
push 6
call fcn.004bc840
add esp, 0x10
test al, al
je 0x4ad525
mov dword [0x5a0ab8], 2
mov esp, ebp
pop ebp
ret
mov dword [0x5a0ab8], 1
jmp 0x4ad536
cmp eax, 2
je 0x4ad576
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4ad55d
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x4ad576
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x4ae600
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00526fc4
Function at 0x4bbbf0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
push esi
xor esi, esi
mov dword [ebp - 8], esi
mov dword [eax], esi
lea eax, [ebp - 0xc]
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 - 0x10], eax
test eax, eax
jne 0x4bbda5
push ebx
mov ebx, dword [ebp - 0xc]
push edi
test ebx, ebx
je 0x4bbd90
nop dword [eax]
mov eax, dword [ebx + 4]
cmp eax, 2
jne 0x4bbc3f
mov eax, 0x10
jmp 0x4bbc4d
cmp eax, 0x17
jne 0x4bbd01
mov eax, 0x1c
cmp dword [ebx + 0x18], 0
mov dword [ebp - 4], eax
je 0x4bbd01
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x4bbd01
cmp ecx, eax
jb 0x4bbd01
push 0x20
call dword [0x59c2b0]
mov edi, eax
add esp, 4
test edi, edi
je 0x4bbd85
mov ecx, dword [ebx]
mov dword [edi], ecx
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov ecx, dword [ebx + 8]
mov dword [edi + 8], ecx
mov eax, dword [ebx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 4]
push eax
mov dword [edi + 0x10], eax
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
call dword [0x59c2b0]
add esp, 4
mov dword [edi + 0x18], eax
test eax, eax
je 0x4bbd74
push dword [ebp - 4]
push dword [ebx + 0x18]
push eax
call fcn.0050b2a0
mov eax, dword [ebx + 0x14]
add esp, 0xc
test eax, eax
je 0x4bbcef
push eax
call dword [0x59c2bc]
add esp, 4
mov dword [edi + 0x14], eax
test eax, eax
je 0x4bbd5a
mov eax, dword [ebp - 8]
test esi, esi
cmove esi, edi
test eax, eax
je 0x4bbcfe
mov dword [eax + 0x1c], edi
mov dword [ebp - 8], edi
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0x4bbc30
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4bbd1d
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebx, ebx
je 0x4bbd8c
test esi, esi
je 0x4bbd4a
push dword [esi + 0x18]
call dword [0x59c2b4]
push dword [esi + 0x14]
call dword [0x59c2b4]
mov edi, dword [esi + 0x1c]
push esi
call dword [0x59c2b4]
add esp, 0xc
mov esi, edi
test edi, edi
jne 0x4bbd25
mov eax, dword [ebp + 0x14]
xor esi, esi
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push dword [edi + 0x18]
mov ebx, 8
call dword [0x59c2b4]
push edi
call dword [0x59c2b4]
add esp, 8
jmp 0x4bbd0f
push edi
mov ebx, 8
call dword [0x59c2b4]
add esp, 4
jmp 0x4bbd0f
mov ebx, 8
jmp 0x4bbd0f
test esi, esi
jne 0x4bbd9c
mov ebx, 0x2af9
push ebx
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
pop edi
mov dword [eax], esi
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4bc060
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.00520606
add esp, 0x18
test eax, eax
je 0x4bc082
cmp eax, 0xffffffff
jne 0x4bc084
xor eax, eax
pop ebp
ret
Function at 0x4bc6f0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push edi
push 0x555dc4
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4bc710
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
push str.LoadLibraryExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [ebp + 8]
mov ebx, eax
push 0x545e94
push esi
mov dword [ebp - 8], ebx
call fcn.00520699
add esp, 8
test eax, eax
je 0x4bc75c
test ebx, ebx
je 0x4bc74c
push 8
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4bc785
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4bc785
push 0x800
push 0
push esi
call ebx
pop esi
mov edi, eax
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [ebp - 4], edx
test edx, edx
je 0x4bc830
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bc7a1
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0x59c2b0]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4bc826
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4bc826
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bc7d2
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bc7f0
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4bc800
mov eax, dword [ebp - 8]
test eax, eax
je 0x4bc81d
push 8
push 0
push ebx
call eax
jmp 0x4bc824
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x59c2b4]
add esp, 4
pop esi
pop ebx
mov eax, edi
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x4bce60
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.0050bda0
add esp, 0xc
lea eax, [ebp - 8]
push 0xf0000000
push dword [ebp + 0x18]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x4bcf2e
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 0x4bcf10
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 0x4bcf10
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 0x4bcf10
cmp esi, dword [ebp - 0xc]
jb 0x4bcf10
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 0x4bcf1e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4bcf2e
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x4bff80
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x59c388]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00520a70
add esp, 4
mov byte [ebp - 0x108], 0
test eax, eax
je 0x4bffe4
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x108], 0
je 0x4bffe4
lea eax, [ebp - 0x108]
push eax
call dword [0x59c2bc]
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
push 0
mov byte [ebp + 0xa], al
lea eax, [ebp + 8]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x1a8]
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c26b8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004ac0c0
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push dword [esi]
call fcn.004c2280
add esp, 0x10
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4c27e0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 0x150]
jne 0x4c292d
push edi
lea eax, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], eax
cmp eax, edi
jae 0x4c282a
mov byte [eax], 0xff
inc eax
mov dword [edi], eax
cmp eax, edi
jae 0x4c282a
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c282a
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
movzx eax, ax
mov dword [ebp + 0xc], eax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov edx, dword [ebp + 0xc]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4c2893
mov byte [eax], 0xf0
mov eax, dword [edi]
inc eax
mov dword [ebx + 0x1eb4], eax
lea esi, [ebx + 0x1cb0]
sub eax, esi
mov dword [edi], esi
mov edi, dword [ebp - 4]
sub eax, 2
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push edi
call fcn.004c2380
add esp, 0x10
push 0
push 3
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c28e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004ac0c0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push esi
call fcn.004c26d0
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [esi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
pop esi
test eax, eax
jns 0x4c292c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.004ac0c0
add esp, 0xc
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c2940
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90c
mov eax, dword [0x59c388]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x104]
push 0x80
push 0
push eax
mov dword [ebp - 0x90c], edi
call fcn.0050bda0
push 0x80
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.0050bda0
mov ebx, dword [edi]
mov dword [ebp - 0x908], ebx
mov esi, dword [ebx + 0x150]
mov eax, dword [esi + 0x1eb4]
sub eax, dword [esi + 0x1eb0]
add eax, 2
push eax
lea eax, [esi + 0x1cb0]
push eax
push 0x3c
push ebx
call fcn.004c2380
mov eax, dword [esi + 0x1eb0]
add esp, 0x28
mov cl, byte [eax]
inc eax
mov dword [esi + 0x1eb0], eax
cmp cl, 0x18
je 0x4c2b28
cmp cl, 0x23
je 0x4c2b02
cmp cl, 0x27
jne 0x4c2bb6
push 0
push 0x27
push 0xfa
push 0xff
push str._c_c_c_c
lea eax, [ebp - 0x904]
push 0x800
push eax
call fcn.004ae9e0
mov esi, dword [esi + 0x1cac]
add esp, 0x1c
mov edi, 4
mov eax, 0x800
test esi, esi
je 0x4c2aa1
nop
mov edx, dword [esi]
mov ecx, edx
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c2a27
sub ecx, ebx
lea ebx, [edi + 1]
add ebx, ecx
cmp ebx, 0x7fa
jae 0x4c2a8f
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x104]
push eax
push str._127_____127s
push edx
call fcn.00411670
add esp, 0x10
test eax, eax
je 0x4c2a8f
lea eax, [ebp - 0x84]
push eax
push 1
lea eax, [ebp - 0x104]
push eax
push 0
mov eax, 0x800
sub eax, edi
push str._c_s_c_s
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.004ae9e0
add esp, 0x1c
mov edi, ebx
mov esi, dword [esi + 4]
test esi, esi
jne 0x4c2a20
mov ebx, dword [ebp - 0x908]
mov eax, 0x800
push 0xf0
push 0xff
sub eax, edi
push str._c_c
push eax
lea eax, [ebp - 0x904]
add eax, edi
push eax
call fcn.004ae9e0
add esp, 0x14
lea eax, [edi + 2]
push 0
push eax
lea eax, [ebp - 0x904]
push eax
mov eax, dword [ebp - 0x90c]
push dword [eax + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c2afc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.004ac0c0
add esp, 0xc
push edi
jmp 0x4c2ba4
lea edx, [esi + 0x1c28]
mov ecx, edx
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c2b10
push 0xf0
push 0xff
push edx
push 0
push 0x23
jmp 0x4c2b49
lea edx, [esi + 0x1c08]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4c2b33
push 0xf0
push 0xff
push edx
push 0
push 0x18
push 0xfa
push 0xff
push str._c_c_c_c_s_c_c
sub ecx, esi
lea eax, [ebp - 0x904]
push 0x800
push eax
lea esi, [ecx + 6]
call fcn.004ae9e0
add esp, 0x28
lea eax, [ebp - 0x904]
push 0
push esi
push eax
push dword [edi + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4c2ba0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push ebx
call fcn.004ac0c0
add esp, 0xc
lea eax, [esi - 2]
push eax
lea eax, [ebp - 0x902]
push eax
push 0x3e
push ebx
call fcn.004c2380
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f3d68
mov esp, ebp
pop ebp
Function at 0x4c3d60
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
mov eax, dword [0x59c388]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [eax + 0x518]
mov ebx, dword [eax]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [edi + 0x154]
push 0
add eax, 4
push eax
push dword [edi + 0x15c]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x148], 0
mov dword [edi + 0x14c], eax
jne 0x4c3df1
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [edi + 0xc8]
push eax
call fcn.0050b2a0
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [edi + 0x148], eax
mov esi, dword [edi + 0x14c]
cmp esi, 4
jge 0x4c3e24
push str.Received_too_short_packet
push ebx
call fcn.004ac0c0
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.004f3d68
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 0x15c]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
mov dword [edi + 0xc], ecx
dec ecx
cmp ecx, 5
ja case.0x4c3e43.1
jmp dword [ecx*4 + 0x4c3f88]
cmp esi, 4
jle case.0x4c3e43.4
movzx ecx, byte [edx + 2]
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x4c3e43.4
lea eax, [esi - 4]
push eax
lea eax, [edx + 4]
push eax
push 1
push dword [ebp - 0x8c]
call fcn.004ac000
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4c3eac
push 5
push edi
call fcn.004c4860
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x14c]
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.004b8a20
jmp 0x4c3f4c
movzx ecx, byte [edx + 2]
lea eax, [edx + 4]
mov dword [ebp - 0x90], eax
add esi, 0xfffffffc
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
lea eax, [edx + 4]
push esi
push eax
mov dword [edi + 8], ecx
call fcn.004c3a30
add esp, 8
cmp eax, esi
jae case.0x4c3e43.4
push dword [ebp - 0x90]
push str.TFTP_error:__s_n
push ebx
call fcn.004ac1a0
jmp 0x4c3f4c
lea eax, [esi - 2]
push eax
lea eax, [edx + 2]
push eax
push edi
call fcn.004c3ae0
add esp, 0xc
test eax, eax
je case.0x4c3e43.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x5457ac
push ebx
call fcn.004ac0c0
add esp, 0xc
push dword [ebp - 0x8c]
call fcn.004b8dd0
add esp, 4
test eax, eax
je 0x4c3e11
push 5
push edi
call fcn.004c4860
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.004f3d68
mov esp, ebp
pop ebp
ret
Function at 0x4c4860
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x10]
mov edx, dword [ecx]
mov eax, dword [eax]
cmp edx, 3
ja case.default.0x4c4872
jmp dword [edx*4 + 0x4c48c8]
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.004c4230
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.004c3fa0
mov dword [ebp + 8], ecx
pop ebp
jmp fcn.004c49e0
push str.TFTP_finished
push 0x552580
push eax
call fcn.004ac1a0
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x5457ac
push eax
call fcn.004ac0c0
add esp, 0xc
mov eax, 0x47
pop ebp
ret