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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx]
mov dword [ebp - 8], edx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 8]
add eax, 0x50
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
sub edx, 4
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 3
ja case.default.0x10040884
mov eax, dword [ebp - 0x1c]
jmp dword [eax*4 + 0x10040d25]
cmp dword [ebp + 0xc], 4
jne 0x100409d7
mov ecx, dword [ebp + 8]
add ecx, 0x14c
push ecx
call fcn.10040826
add esp, 4
and eax, 0xffff
mov dword [ebp - 0x14], eax
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0x30]
cmp dword [ebp - 0x14], eax
je 0x100409b4
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + 0x30]
test edx, edx
jne 0x100408db
cmp dword [ebp - 0x14], 0xffff
je 0x100409b4
mov eax, dword [ebp + 8]
xor ecx, ecx
mov cx, word [eax + 0x30]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push str.Received_ACK_for_block__d__expecting__d_n
mov eax, dword [ebp - 8]
push eax
call fcn.1003504f
add esp, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
add edx, 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], edx
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x18]
cmp eax, dword [edx + 0x20]
jle 0x1004093b
mov ecx, dword [ebp + 8]
xor edx, edx
mov dx, word [ecx + 0x30]
push edx
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
mov eax, dword [ebp - 8]
push eax
call fcn.100350d3
add esp, 0xc
mov dword [ebp - 4], 0x37
jmp 0x100409ac
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp + 8]
add eax, 0xb8
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x140]
add edx, 4
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x150]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x100409ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
call fcn.1003c041
add esp, 8
push eax
push 0x1006670c
mov eax, dword [ebp - 8]
push eax
call fcn.100350d3
add esp, 0xc
mov dword [ebp - 4], 0x37
mov eax, dword [ebp - 4]
jmp 0x10040d20
mov ecx, dword [ebp + 8]
add ecx, 0x2c
push ecx
call fcn.1005012c
add esp, 4
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x30]
add ax, 1
mov ecx, dword [ebp + 8]
mov word [ecx + 0x30], ax
jmp 0x100409e0
mov edx, dword [ebp + 8]
mov word [edx + 0x30], 1
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 0
push 3
mov ecx, dword [ebp + 8]
add ecx, 0x150
push ecx
call fcn.100402fb
add esp, 8
mov edx, dword [ebp + 8]
mov ax, word [edx + 0x30]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0x150
push ecx
call fcn.100407f9
add esp, 8
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0x30]
cmp eax, 1
jle 0x10040a4a
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x140]
cmp eax, dword [edx + 0x144]
jge 0x10040a4a
mov ecx, dword [ebp + 8]
mov dword [ecx], 3
xor eax, eax
jmp 0x10040d20
mov edx, dword [ebp + 8]
mov dword [edx + 0x140], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x150]
add ecx, 4
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov edx, dword [eax]
mov dword [edx + 0x110], ecx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov eax, dword [ecx + 0x144]
sub eax, dword [edx + 0x140]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
call fcn.100416f0
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x10040aa8
mov eax, dword [ebp - 4]
jmp 0x10040d20
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x140]
add ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [edx + 0x140], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x110]
add eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
mov ecx, dword [edx]
mov dword [ecx + 0x110], eax
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x140]
cmp ecx, dword [eax + 0x144]
jge 0x10040afa
cmp dword [ebp - 0xc], 0
jne 0x10040a71
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x138]
push eax
mov ecx, dword [ebp + 8]
add ecx, 0xb8
push ecx
push 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x140]
add eax, 4
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x150]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x10040b6f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
push eax
call fcn.1003c041
add esp, 8
push eax
push 0x10066710
mov ecx, dword [ebp - 8]
push ecx
call fcn.100350d3
add esp, 0xc
mov eax, 0x37
jmp 0x10040d20
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x140]
cdq
mov esi, dword [ecx + 0x28]
add esi, eax
mov eax, dword [ecx + 0x2c]
adc eax, edx
mov ecx, dword [ebp - 0x18]
mov dword [ecx + 0x28], esi
mov dword [ecx + 0x2c], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x2c]
push eax
mov ecx, dword [edx + 0x28]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.10031c83
add esp, 0xc
jmp 0x10040d1d
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp + 8]
xor eax, eax
mov ax, word [edx + 0x30]
add eax, 1
and eax, 0xffff
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
mov ecx, dword [ebp - 8]
push ecx
call fcn.1003504f
add esp, 0x10
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [edx + 0x18]
cmp ecx, dword [eax + 0x20]
jle 0x10040c0a
mov edx, dword [ebp + 8]
mov dword [edx + 8], 0xffffff9d
mov eax, dword [ebp + 8]
mov dword [eax], 3
jmp 0x10040c95
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp + 8]
add eax, 0xb8
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x140]
add edx, 4
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x150]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x10040c7e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
call fcn.1003c041
add esp, 8
push eax
push 0x10066748
mov eax, dword [ebp - 8]
push eax
call fcn.100350d3
add esp, 0xc
mov eax, 0x37
jmp 0x10040d20
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + 0x2c]
push edx
mov eax, dword [ecx + 0x28]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.10031c83
add esp, 0xc
jmp 0x10040d1d
mov edx, dword [ebp + 8]
mov dword [edx], 3
push 5
mov eax, dword [ebp + 8]
add eax, 0x150
push eax
call fcn.100402fb
add esp, 8
mov ecx, dword [ebp + 8]
mov dx, word [ecx + 0x30]
push edx
mov eax, dword [ebp + 8]
add eax, 0x150
push eax
call fcn.100407f9
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp + 8]
add eax, 0xb8
push eax
push 0
push 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x150]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov edx, dword [ebp + 8]
mov dword [edx], 3
jmp 0x10040d1d
mov eax, dword [ebp + 0xc]
push eax
push str.tftp_tx:_internal_error__event:__i
mov ecx, dword [ebp - 8]
push ecx
call fcn.100350d3
add esp, 0xc
mov eax, dword [ebp - 4]
pop esi
mov esp, ebp
pop ebp
ret