Function at 0x40b0b2
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Send data
Send data on socket
Write file on windows

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
xor ebx, ebx
cmp esi, ebx
jne 0x40b0d6
push 0x358
push str.._services_tftpd_thread.c
push str.pTftp_NULL
call fcn.0040f696
add esp, 0xc
lea ebp, [esi + 0x4064]
cmp dword [esp + 0x14], ebx
jne 0x40b118
push 4
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [ebp], ax
push 4
xor eax, eax
push ebp
mov word [ebp + 2], ax
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 4
je 0x40b118
push str.send
push ebx
call fcn.0040a3a3
pop ecx
pop ecx
jmp 0x40b35d
mov dword [esi + 0x40], ebx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x44a0], ebx
je 0x40b133
lea eax, [esi + 0x44a4]
push eax
call fcn.0040d671
pop ecx
push edi
mov eax, esi
call fcn.0040a3d7
test eax, eax
je 0x40b25f
push ebx
push 0x4004
lea edi, [esi + 0x60]
push edi
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jle 0x40b2b4
push esi
call fcn.004098b2
pop ecx
cmp ebx, 4
jb 0x40b2c6
movzx eax, word [edi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp ax, 3
jne 0x40b2df
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
test ax, ax
jne 0x40b1c7
xor eax, eax
cmp dword [esi + 0x2c], eax
jne 0x40b1c7
lea ecx, [ebx - 4]
mov dword [esi + 0x38], ecx
cmp dword [esi + 0x4484], eax
jne 0x40b278
cmp dword [esi + 0x40], eax
jne 0x40b278
push str.WARNING:_First_block_sent_by_client_is_0__should_be_1__fixed_by_Tftpd32
push 1
call fcn.004010eb
dec dword [esi + 0x2c]
pop ecx
pop ecx
movzx eax, word [edi + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov cx, word [esi + 0x2c]
inc cx
cmp ax, cx
jne 0x40b235
mov eax, dword [esi + 0x3c]
add dword [esi + 0x4488], eax
inc dword [esi + 0x2c]
and dword [esi + 0x3c], 0
and dword [esi + 0x40], 0
lea eax, [ebx - 4]
push 0
lea ebx, [esi + 0x38]
push ebx
push eax
add edi, 4
push edi
push dword [esi + 0x24]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b306
cmp dword [esi + 0x44a0], 0
je 0x40b22d
push dword [ebx]
lea eax, [esi + 0x44a4]
push edi
push eax
call fcn.0040ddf4
add esp, 0xc
mov eax, dword [ebx]
add dword [esi + 0x4484], eax
xor ebx, ebx
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 4
call edi
mov word [ebp], ax
movzx eax, word [esi + 0x2c]
push eax
call edi
push ebx
push 4
push ebp
mov word [ebp + 2], ax
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_send]
jmp 0x40b27a
mov eax, dword [esi + 0x2c]
inc eax
push eax
push str.timeout_while_waiting_for_data_blk__d
push 9
call fcn.004010eb
add esp, 0xc
inc dword [esi + 0x3c]
jmp 0x40b237
xor ebx, ebx
mov eax, dword [esi + 0x38]
cmp eax, dword [esi + 0x48]
mov eax, dword [0x429bec]
jne 0x40b296
cmp dword [esi + 0x40], 0x32
jae 0x40b29c
cmp dword [esi + 0x3c], eax
jb 0x40b134
cmp dword [esi + 0x40], 0x32
jb 0x40b30f
lea eax, [esi + 0x427a]
push eax
mov ax, word [esi + 0x2c]
inc ax
movzx eax, ax
push eax
push str.MAX_RETRIES_while_waiting_for_Data_block__d._file___s_
jmp 0x40b32a
push str.recv
push 0
call fcn.0040a3a3
pop ecx
jmp 0x40b35b
push str.rcvd_packet_too_short
push 1
call fcn.004010eb
push 4
push esi
call fcn.0040a095
add esp, 0x10
jmp 0x40b33a
movzx eax, word [edi]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push str.Peer_sent_unexpected_message__d
push 1
call fcn.004010eb
push 4
push esi
call fcn.0040a095
add esp, 0x14
jmp 0x40b33a
push str.write
push 3
jmp 0x40b2bb
cmp dword [esi + 0x3c], eax
jb 0x40b33e
lea eax, [esi + 0x427a]
push eax
mov ax, word [esi + 0x2c]
inc ax
movzx eax, ax
push eax
push str.TIMEOUT_while_waiting_for_Data_block__d__file___s_
push ebx
call fcn.004010eb
push ebx
push esi
call fcn.0040a095
add esp, 0x18
xor eax, eax
jmp 0x40b35c
cmp dword [esi + 0x44a0], ebx
je 0x40b352
cmp dword [esi + 0x28], ebx
jne 0x40b352
mov ecx, esi
call fcn.0040a1be
push esi
call fcn.0040abb8
xor eax, eax
inc eax
pop ecx
pop edi
pop esi
pop ebp
pop ebx
ret