joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40e060
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
movzx eax, byte [esi + 0x286]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x40e0a4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00422d30
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040d790
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0040d790
add esp, 8
pop esi
pop ecx
ret

Function at 0x40e0c0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x40e109
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x40e121
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x40e520
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x458]
cmp eax, 0xffffffff
je 0x40e591
mov ecx, dword [ecx + 0x44c]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x40e591
mov ecx, dword [esp + 0xc]
mov eax, dword [eax]
test ecx, ecx
je 0x40e54c
mov dword [ecx], eax
mov ecx, dword [eax + 0xd4]
push esi
mov esi, dword [esp + 0xc]
mov dword [esi], ecx
cmp byte [eax + 0xdc], 0
je 0x40e579
push eax
call fcn.00404540
add esp, 4
test eax, eax
jne 0x40e575
mov dword [esi], 0xffffffff
pop esi
xor eax, eax
ret
mov eax, dword [eax + 0xd4]
push 2
push 1
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
jmp 0x40e56b
mov ecx, dword [esp + 8]
mov dword [ecx], 0xffffffff
xor eax, eax
ret

Function at 0x40e5a0
Capabilities:
Parse pe header

Disassembly:
mov al, byte [esp + 4]
movsx ecx, al
add ecx, 0xffffff9f
cmp ecx, 0x19
ja case.default.0x40e5af
jmp dword [ecx*4 + 0x40e604]
mov al, 0x41
ret
mov al, 0x42
ret
mov al, 0x43
ret
mov al, 0x44
ret
mov al, 0x45
ret
mov al, 0x46
ret
mov al, 0x47
ret
mov al, 0x48
ret
mov al, 0x49
ret
mov al, 0x4a
ret
mov al, 0x4b
ret
mov al, 0x4c
ret
mov al, 0x4d
ret
mov al, 0x4e
ret
mov al, 0x4f
ret
mov al, 0x50
ret
mov al, 0x51
ret
mov al, 0x52
ret
mov al, 0x53
ret
mov al, 0x54
ret
mov al, 0x55
ret
mov al, 0x56
ret
mov al, 0x57
ret
mov al, 0x58
ret
mov al, 0x59
ret
mov al, 0x5a
ret
Function at 0x413ad0
Capabilities:
Create thread

Disassembly:
sub esp, 0xc
push ebx
push esi
push 1
push 0x24
call dword [0x5010a4]
xor ebx, ebx
mov esi, eax
add esp, 8
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
cmp esi, ebx
jne 0x413b02
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
mov eax, dword [edi + 0x2e0]
push ebp
lea ebp, [edi + 0x2e0]
push eax
mov dword [esp + 0x10], ebp
call fcn.00404af0
mov ecx, dword [esp + 0x20]
push ecx
call dword [0x5010a0]
add esp, 8
mov dword [ebp], eax
cmp eax, ebx
jne 0x413b49
push esi
call dword [0x501098]
add esp, 4
push 0xc
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
mov edx, dword [esp + 0x20]
push ebx
push 1
mov dword [edi + 0x2e4], edx
mov byte [edi + 0x2ec], bl
mov dword [edi + 0x2f0], ebx
mov dword [edi + 0x2e8], ebx
mov dword [edi + 0x2f4], esi
push ebx
mov dword [esi + 0xc], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0x10], eax
cmp eax, ebx
jne 0x413b86
push ebp
jmp 0x413bd9
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push 1
push ebx
call ebp
mov dword [esi + 0x14], eax
cmp eax, ebx
je 0x413bd4
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0x1c], eax
cmp eax, ebx
jne 0x413bb1
mov ecx, dword [esp + 0xc]
push ecx
jmp 0x413bd9
push ebx
push ebx
push 1
push ebx
call ebp
mov dword [esi + 0x20], eax
cmp eax, ebx
jne 0x413bc6
mov edx, dword [esp + 0xc]
push edx
jmp 0x413bd9
push ebx
push ebx
push 1
push ebx
call ebp
mov dword [esi + 0x18], eax
cmp eax, ebx
jne 0x413bf2
mov eax, dword [esp + 0xc]
push eax
call fcn.004139f0
add esp, 4
push 0xb
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
lea ecx, [esi + 4]
push ecx
push ebx
push edi
push 0x413920
push ebx
push ebx
call fcn.004abccd
add esp, 0x18
mov dword [esi], eax
cmp eax, ebx
jne 0x413c31
call fcn.004abb83
mov edx, dword [eax]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esp + 0xc]
push eax
call fcn.004139f0
add esp, 4
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0xc
ret
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov ecx, dword [esi + 0x18]
push edx
push 2
mov dword [esp + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push ebx
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
pop ebp
mov dword [esi + 0xc], eax
pop esi
mov al, 1
pop ebx
add esp, 0xc
ret
Function at 0x413c70
Capabilities:
Terminate thread

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x174]
mov esi, dword [edi + 0x2f4]
mov dword [esp + 0x14], ecx
test eax, eax
jne 0x413c9d
mov eax, dword [ecx + 0x170]
test eax, eax
jne 0x413c9d
mov eax, 0x493e0
push eax
mov eax, dword [esi + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x10]
push ecx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [esi + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call ebx
mov eax, dword [esi + 0x14]
push eax
mov dword [esi + 0x10], 0
call ebx
mov dword [esi + 0x14], 0
mov bl, 1
test ebp, ebp
jne 0x413cf9
mov ecx, dword [esi]
push 0x1388
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x413d4f
mov edx, dword [esi]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
lea ebp, [esi + 8]
mov byte [edi + 0x2ec], bl
mov dword [ebp], 0xffffffff
mov eax, dword [esp + 0x18]
test eax, eax
je 0x413d19
mov edx, dword [edi + 0x2e8]
mov dword [eax], edx
xor esi, esi
cmp dword [edi + 0x2e8], esi
jne 0x413e00
mov ebp, dword [ebp]
cmp ebp, 0x1b
jne 0x413d6b
push ebp
mov esi, ebp
call fcn.004223f0
push eax
mov eax, dword [esp + 0x1c]
push str.Could_not_resolve_host:__s
push eax
call fcn.0040d820
add esp, 0x10
jmp 0x413e00
mov eax, dword [edi + 0x2f0]
push eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, dword [esi]
lea ebp, [esi + 8]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x413d09
cmp byte [edi + 0x2ec], 0
je 0x413dd1
cmp byte [edi + 0x14b], 0
mov ecx, dword [edi + 0x2f0]
push ecx
push edi
je 0x413dab
call fcn.00422d30
mov edx, dword [edi + 0xa0]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_proxy:__s___s
push eax
call fcn.0040d820
add esp, 0x18
mov esi, 5
jmp 0x413e00
call fcn.00422d30
mov edx, dword [edi + 0x8c]
push eax
mov eax, dword [esp + 0x20]
push edx
push str.Could_not_resolve_host:__s___s
push eax
call fcn.0040d820
add esp, 0x18
mov esi, 6
jmp 0x413e00
cmp ebp, 0xffffffff
je 0x413de2
cmp dword [edi + 0x2f0], 0x2afc
jne 0x413dfb
mov ecx, dword [edi + 0x8c]
mov edx, dword [esp + 0x14]
push ecx
push 0x4c16b4
push edx
call fcn.0040d820
add esp, 0xc
mov esi, 0x1c
lea eax, [edi + 0x2e0]
push eax
call fcn.004139f0
add esp, 4
cmp dword [edi + 0x2e8], 0
mov eax, esi
jne 0x413e20
mov byte [edi + 0x148], bl
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x413ea0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 0x10]
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
mov ebx, dword [edi]
lea ecx, [esp + 0x10]
push ecx
push esi
push 2
mov dword [eax], 0
call fcn.00422f70
add esp, 0xc
test eax, eax
jle 0x413ee4
mov edx, dword [esp + 0x18]
push edx
push esi
lea eax, [esp + 0x18]
push eax
push 2
call fcn.00413730
add esp, 0x10
pop edi
pop esi
pop ebx
ret
push ebp
mov ebp, dword [esp + 0x1c]
push ebp
push esi
call fcn.00413ad0
add esp, 8
test al, al
je 0x413f08
mov ecx, dword [esp + 0x20]
pop ebp
pop edi
pop esi
mov dword [ecx], 1
xor eax, eax
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
call fcn.00422d30
push eax
push esi
push str.init_resolve_thread___failed_for__s___s_n
push ebx
call fcn.0040d790
add esp, 0x18
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x413f55
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.00422d30
push eax
push ebp
push esi
push str.gethostbyname_2__failed_for__s:_d___s_n
push ebx
call fcn.0040d790
add esp, 0x1c
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
ret
push ebp
push eax
call fcn.00413600
add esp, 8
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x414480
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0xc]
push ebx
mov ebx, dword [eax]
mov eax, dword [esp + 8]
add eax, 0xfffffffd
push edi
cmp eax, 4
ja case.0x414497.4
jmp dword [eax*4 + 0x4146a0]
lea eax, [esi + 0x154]
call fcn.004141b0
movzx ecx, word [esi + 0x38]
movzx edi, ax
inc ecx
cmp ecx, edi
je 0x4144f3
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.0040d790
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x4144f3
jg 0x4144d7
cmp eax, dword [esi + 0x20]
jbe 0x4144f3
movzx edx, word [esi + 0x38]
inc edx
push edx
push str.tftp_rx:_giving_up_waiting_for_block__d
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
mov word [esi + 0x38], di
lea edi, [esi + 0x158]
mov eax, 4
mov ecx, edi
mov dword [esi + 0x14], 0
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov eax, dword [esi + 0x140]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0xc0]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x414565
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
mov edx, dword [esi + 0x14c]
xor eax, eax
add edx, 4
cmp dword [esi + 0x144], edx
pop edi
setl al
pop ebx
lea eax, [eax + eax + 1]
mov dword [esi], eax
xor eax, eax
ret
xor ecx, ecx
mov word [esi + 0x38], cx
mov dword [esi + 0x14], ecx
lea edi, [esi + 0x158]
lea eax, [ecx + 4]
mov ecx, edi
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov edx, dword [esi + 0x140]
mov ecx, dword [edi]
push edx
mov edx, dword [esi + 0x10]
lea eax, [esi + 0xc0]
push eax
push 0
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
pop edi
mov dword [esi], 1
xor eax, eax
pop ebx
ret
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.0040d790
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x414634
jg 0x414622
cmp eax, dword [esi + 0x20]
jbe 0x414634
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
pop edi
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x140]
mov eax, dword [esi + 0x158]
push ecx
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0xc0]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41462f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
Function at 0x41449e
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0xc]
push ebx
mov ebx, dword [eax]
mov eax, dword [esp + 8]
add eax, 0xfffffffd
push edi
cmp eax, 4
ja case.0x414497.4
jmp dword [eax*4 + 0x4146a0]
lea eax, [esi + 0x154]
call fcn.004141b0
movzx ecx, word [esi + 0x38]
movzx edi, ax
inc ecx
cmp ecx, edi
je 0x4144f3
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.0040d790
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x4144f3
jg 0x4144d7
cmp eax, dword [esi + 0x20]
jbe 0x4144f3
movzx edx, word [esi + 0x38]
inc edx
push edx
push str.tftp_rx:_giving_up_waiting_for_block__d
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
mov word [esi + 0x38], di
lea edi, [esi + 0x158]
mov eax, 4
mov ecx, edi
mov dword [esi + 0x14], 0
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov eax, dword [esi + 0x140]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0xc0]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x414565
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
mov edx, dword [esi + 0x14c]
xor eax, eax
add edx, 4
cmp dword [esi + 0x144], edx
pop edi
setl al
pop ebx
lea eax, [eax + eax + 1]
mov dword [esi], eax
xor eax, eax
ret
xor ecx, ecx
mov word [esi + 0x38], cx
mov dword [esi + 0x14], ecx
lea edi, [esi + 0x158]
lea eax, [ecx + 4]
mov ecx, edi
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov edx, dword [esi + 0x140]
mov ecx, dword [edi]
push edx
mov edx, dword [esi + 0x10]
lea eax, [esi + 0xc0]
push eax
push 0
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
pop edi
mov dword [esi], 1
xor eax, eax
pop ebx
ret
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.0040d790
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x414634
jg 0x414622
cmp eax, dword [esi + 0x20]
jbe 0x414634
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
pop edi
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x140]
mov eax, dword [esi + 0x158]
push ecx
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0xc0]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41462f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
Function at 0x414584
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0xc]
push ebx
mov ebx, dword [eax]
mov eax, dword [esp + 8]
add eax, 0xfffffffd
push edi
cmp eax, 4
ja case.0x414497.4
jmp dword [eax*4 + 0x4146a0]
lea eax, [esi + 0x154]
call fcn.004141b0
movzx ecx, word [esi + 0x38]
movzx edi, ax
inc ecx
cmp ecx, edi
je 0x4144f3
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.0040d790
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x4144f3
jg 0x4144d7
cmp eax, dword [esi + 0x20]
jbe 0x4144f3
movzx edx, word [esi + 0x38]
inc edx
push edx
push str.tftp_rx:_giving_up_waiting_for_block__d
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
mov word [esi + 0x38], di
lea edi, [esi + 0x158]
mov eax, 4
mov ecx, edi
mov dword [esi + 0x14], 0
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov eax, dword [esi + 0x140]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0xc0]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x414565
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
mov edx, dword [esi + 0x14c]
xor eax, eax
add edx, 4
cmp dword [esi + 0x144], edx
pop edi
setl al
pop ebx
lea eax, [eax + eax + 1]
mov dword [esi], eax
xor eax, eax
ret
xor ecx, ecx
mov word [esi + 0x38], cx
mov dword [esi + 0x14], ecx
lea edi, [esi + 0x158]
lea eax, [ecx + 4]
mov ecx, edi
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov edx, dword [esi + 0x140]
mov ecx, dword [edi]
push edx
mov edx, dword [esi + 0x10]
lea eax, [esi + 0xc0]
push eax
push 0
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
pop edi
mov dword [esi], 1
xor eax, eax
pop ebx
ret
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.0040d790
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x414634
jg 0x414622
cmp eax, dword [esi + 0x20]
jbe 0x414634
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
pop edi
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x140]
mov eax, dword [esi + 0x158]
push ecx
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0xc0]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41462f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
Function at 0x4145fd
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0xc]
push ebx
mov ebx, dword [eax]
mov eax, dword [esp + 8]
add eax, 0xfffffffd
push edi
cmp eax, 4
ja case.0x414497.4
jmp dword [eax*4 + 0x4146a0]
lea eax, [esi + 0x154]
call fcn.004141b0
movzx ecx, word [esi + 0x38]
movzx edi, ax
inc ecx
cmp ecx, edi
je 0x4144f3
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebx
call fcn.0040d790
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x4144f3
jg 0x4144d7
cmp eax, dword [esi + 0x20]
jbe 0x4144f3
movzx edx, word [esi + 0x38]
inc edx
push edx
push str.tftp_rx:_giving_up_waiting_for_block__d
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
mov word [esi + 0x38], di
lea edi, [esi + 0x158]
mov eax, 4
mov ecx, edi
mov dword [esi + 0x14], 0
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov eax, dword [esi + 0x140]
mov edx, dword [edi]
push eax
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0xc0]
push ecx
push 0
push 4
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x414565
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
mov edx, dword [esi + 0x14c]
xor eax, eax
add edx, 4
cmp dword [esi + 0x144], edx
pop edi
setl al
pop ebx
lea eax, [eax + eax + 1]
mov dword [esi], eax
xor eax, eax
ret
xor ecx, ecx
mov word [esi + 0x38], cx
mov dword [esi + 0x14], ecx
lea edi, [esi + 0x158]
lea eax, [ecx + 4]
mov ecx, edi
call fcn.00414160
mov ax, word [esi + 0x38]
mov ecx, edi
call fcn.00414180
mov edx, dword [esi + 0x140]
mov ecx, dword [edi]
push edx
mov edx, dword [esi + 0x10]
lea eax, [esi + 0xc0]
push eax
push 0
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
pop edi
mov dword [esi], 1
xor eax, eax
pop ebx
ret
inc dword [esi + 0x14]
mov eax, dword [esi + 0x14]
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebx
call fcn.0040d790
mov eax, dword [esi + 0x14]
cdq
add esp, 0xc
cmp edx, dword [esi + 0x24]
jl 0x414634
jg 0x414622
cmp eax, dword [esi + 0x20]
jbe 0x414634
mov dword [esi + 8], 0xffffff9d
mov dword [esi], 3
pop edi
xor eax, eax
pop ebx
ret
mov ecx, dword [esi + 0x140]
mov eax, dword [esi + 0x158]
push ecx
mov ecx, dword [esi + 0x10]
lea edx, [esi + 0xc0]
push edx
push 0
push 4
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x41462f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, dword [esi + 0xc]
push eax
push edx
call fcn.00422d30
push eax
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0x14
pop edi
mov eax, 0x37
pop ebx
ret
push str.tftp_rx:_internal_error
push 0x4c0204
push ebx
call fcn.0040d820
add esp, 0xc
pop edi
mov eax, 0x47
pop ebx
ret
Function at 0x415f80
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x507a74]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x415fb5
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.0040d820
add esp, 0xc
jmp 0x415fee
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp]
cmp al, 2
jne 0x415fe0
shr eax, 8
test al, al
jne 0x415fe0
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004a81b0
add esp, 0x194
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.0040d820
add esp, 8
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.004a81b0
add esp, 0x194
ret

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

Disassembly:
push ecx
mov edx, dword [edi + 0xd4]
mov al, byte [esp + 8]
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [esp + 0xc]
push ecx
push edx
mov byte [esp + 0x14], 0xff
mov byte [esp + 0x15], al
mov byte [esp + 0x16], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jge 0x4161b4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0040d820
add esp, 0xc
mov esi, dword [esp + 0xc]
mov ecx, dword [edi]
push str.SENT
mov eax, ebx
call fcn.00416070
add esp, 4
pop esi
pop ecx
ret