Function at 0x100120d8
Capabilities:
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
test esi, esi
jne 0x100120fb
push 0x2be
push str._services_tftpd_thread.c
push str.pTftp_NULL
call dword [sym.imp.MSVCR120.dll__wassert]
add esp, 0xc
movzx eax, byte [esi + 0x426f]
push eax
movzx eax, byte [esi + 0x426e]
push eax
movzx eax, byte [esi + 0x426d]
push eax
movzx eax, byte [esi + 0x426c]
push eax
push 1
push dword [esi + 0x2c]
mov dword [esi + 0x34], 1
push str.nCount:__d__nLastToSend___d__from__u._u._u._u
push 2
call fcn.10001113
xor ebx, ebx
add esp, 0x20
cmp dword [esi + 0x44a0], ebx
je 0x1001214d
lea eax, [esi + 0x44a4]
push eax
call fcn.10015129
pop ecx
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
mov dword [esi + 0x40], ebx
mov dword [esi + 0x3c], ebx
cmp dword [esi + 0x3c], ebx
jbe 0x1001216c
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x10012265
mov dword [esi + 0x34], eax
cmp dword [esi + 0x2c], ebx
jbe 0x10012265
mov eax, dword [esi + 0x2c]
add eax, dword [esi + 0x54]
mov ecx, dword [esi + 0x30]
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [esi + 0x34]
cmp eax, ecx
ja 0x1001225f
dec eax
lea edi, [esi + 0x60]
imul eax, dword [esi + 0x48]
push ebx
push ebx
push eax
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1001243e
push 0
lea ebx, [esi + 0x38]
push ebx
push dword [esi + 0x48]
lea ebp, [edi + 4]
push ebp
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001243e
cmp dword [esi + 0x44a0], 0
je 0x100121ea
cmp dword [esi + 0x40], 0
jne 0x100121ea
push dword [ebx]
lea eax, [esi + 0x44a4]
push ebp
push eax
call fcn.10015850
add esp, 0xc
mov ebp, dword [sym.imp.WS2_32.dll_htons]
push 3
call ebp
mov word [edi], ax
movzx eax, word [esi + 0x34]
push eax
call ebp
mov word [edi + 2], ax
cmp dword [esi + 0x28], 0
je 0x10012214
mov ecx, esi
call fcn.100115d9
push 4
pop ebp
jmp 0x10012228
mov eax, dword [ebx]
push 0
push 4
pop ebp
add eax, ebp
push eax
push edi
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
movzx eax, word [esi + 0x34]
push eax
push str.send_ack_blk__d
push 0xc
call fcn.10001113
add esp, 0xc
test edi, edi
js 0x10012437
mov eax, dword [ebx]
add eax, ebp
cmp edi, eax
jne 0x10012437
inc dword [esi + 0x40]
inc dword [esi + 0x34]
xor ebx, ebx
jmp 0x10012175
mov ebp, dword [sym.imp.WS2_32.dll_ntohs]
push dword [esi + 0x4c]
push dword [esi + 0x2c]
push str.waiting_for_ack_blk__d__dwTimeout___d_
push 0xc
call fcn.10001113
add esp, 0x10
mov ecx, esi
call fcn.1001168c
test eax, eax
je 0x1001241a
push ebx
push 0x204
lea edi, [esi + 0x4064]
push edi
push dword [esi + 0x20]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x10012469
push 4
pop ecx
cmp eax, ecx
jge 0x100122c4
push ecx
push eax
push str.rcvd_packet_too_short__get_u_need_u
push 1
call fcn.10001113
add esp, 0x10
jmp 0x1001235e
movzx eax, word [edi]
push eax
call ebp
cmp ax, 5
je 0x10012452
movzx eax, word [edi]
push eax
call ebp
push 4
pop ecx
cmp ax, cx
jne 0x100123fc
movzx eax, word [edi + 2]
push eax
call ebp
cmp ax, word [esi + 0x2c]
jne 0x1001231a
mov eax, dword [esi + 0x3c]
add dword [esi + 0x4488], eax
mov ecx, dword [esi + 0x2c]
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x40], ebx
test ecx, ecx
je 0x10012312
mov eax, dword [esi + 0x38]
add dword [esi + 0x4484], eax
lea eax, [ecx + 1]
mov dword [esi + 0x2c], eax
jmp 0x1001235e
cmp dword [esi + 0x40], 3
jae 0x100123c6
cmp dword [esi + 0x2c], ebx
jbe 0x100123c6
movzx eax, word [edi + 2]
movzx ebx, word [esi + 0x2c]
push eax
call ebp
lea ecx, [ebx - 1]
cmp ax, cx
jne 0x100123c4
push 0
lea eax, [ebx - 1]
push eax
push str.Ack_block__d_ignored__received_twice_
push 1
call fcn.10001113
add esp, 0x10
inc dword [esi + 0x3c]
xor ebx, ebx
mov eax, dword [esi + 0x34]
mov ecx, dword [0x1001fd04]
cmp eax, dword [esi + 0x30]
jbe 0x1001237a
cmp dword [0x1001ffa8], 0
jne 0x10012392
cmp dword [esi + 0x40], ebx
je 0x10012392
cmp dword [esi + 0x40], 0x32
jae 0x1001239c
cmp dword [esi + 0x3c], ecx
jae 0x10012392
cmp dword [0x10020da0], 0
jne 0x10012159
cmp dword [esi + 0x40], 0x32
jb 0x10012470
lea eax, [esi + 0x427a]
push eax
movzx eax, word [esi + 0x2c]
push eax
push str.MAX_RETRIES_while_waiting_for_Ack_block__d._file___s_
push ebx
call fcn.10001113
add esp, 0x10
xor edx, edx
mov ecx, esi
call fcn.1001131c
jmp 0x10012465
xor ebx, ebx
cmp dword [esi + 0x28], ebx
jne 0x1001235e
movzx eax, word [edi + 2]
mov ebx, dword [esi + 0x2c]
push eax
call ebp
movzx eax, ax
cmp eax, ebx
jbe 0x1001235c
movzx eax, word [edi + 2]
push ebx
push eax
call ebp
movzx eax, ax
push eax
push str.Ack_of_block__d_received__last_block_sent__d___
push 1
call fcn.10001113
add esp, 0x10
jmp 0x1001235c
movzx eax, word [edi]
push eax
call ebp
movzx eax, ax
push eax
push str.ignore_unknown_opcode__d_received
push 2
call fcn.10001113
add esp, 0xc
jmp 0x1001235e
push dword [esi + 0x4c]
push dword [esi + 0x2c]
push str.timeout_while_waiting_for_ack_blk__d__dwTimeout___d_
push 2
call fcn.10001113
add esp, 0x10
inc dword [esi + 0x3c]
jmp 0x1001235e
push str.send
jmp 0x10012443
push 0x1001c2a4
xor edx, edx
mov ecx, esi
call fcn.10011651
pop ecx
jmp 0x100124d4
lea eax, [edi + 4]
push eax
push str.Peer_returns_ERROR___s_____aborting_transfer
push 1
call fcn.10001113
add esp, 0xc
xor eax, eax
jmp 0x100124d4
push str.recv
jmp 0x10012443
cmp dword [esi + 0x3c], ecx
jb 0x100124a1
mov eax, dword [esi + 0x34]
cmp eax, dword [esi + 0x30]
jbe 0x100124da
lea eax, [esi + 0x427a]
push eax
movzx eax, word [esi + 0x2c]
push eax
push str.WARNING_:_Last_block__d_not_acked_for_file___s_
push 1
call fcn.10001113
mov eax, dword [esi + 0x3c]
add esp, 0x10
add dword [esi + 0x4488], eax
push dword [esi + 0x34]
push dword [esi + 0x2c]
push str.Count__d__Last_pkt__d
push 0xa
call fcn.10001113
add esp, 0x10
cmp dword [esi + 0x44a0], ebx
je 0x100124ca
cmp dword [esi + 0x28], ebx
jne 0x100124ca
mov ecx, esi
call fcn.1001142f
mov ecx, esi
call fcn.10011f15
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
cmp dword [esi + 0x3c], ecx
jb 0x100124a1
push ecx
push dword [esi + 0x2c]
push str.TIMEOUT_waiting_for_Ack_block__d__Retransmit___d_
push 1
jmp 0x100123ae