Function at 0x418f20
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x18]
push ebx
mov ebx, dword [eax]
push ebp
push esi
mov esi, dword [eax + 0x3d0]
push edi
mov dword [esp + 0x10], 0
call fcn.004130d0
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x54], edx
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x5c], edx
cmp dword [esi], 3
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
je 0x41923f
lea ecx, [ecx]
cmp dword [esp + 0x10], 0
jne 0x41923f
mov ecx, dword [esi + 0x1c]
imul ecx, ecx, 0x3e8
cmp dword [ebx + 0x314], 0
je 0x418fc9
mov edi, dword [ebx + 0x1f8]
mov eax, dword [ebx + 0x1fc]
mov edx, edi
or edx, eax
je 0x419011
mov edx, dword [ebx + 0x4c4]
mov ebp, dword [ebx + 0x4c0]
cmp edx, eax
jl 0x419011
jg 0x418fa9
cmp ebp, edi
jbe 0x419011
mov ecx, dword [esi + 0x154]
push ecx
push edx
push ebp
push eax
mov eax, dword [ebx + 0x1f8]
push eax
or edi, 0xffffffff
call fcn.0040b380
mov ecx, eax
add esp, 0x14
jmp 0x419014
mov edi, dword [ebx + 0x200]
mov eax, dword [ebx + 0x204]
mov edx, edi
or edx, eax
je 0x419011
mov edx, dword [ebx + 0x4bc]
mov ebp, dword [ebx + 0x4b8]
cmp edx, eax
jl 0x419011
jg 0x418ff1
cmp ebp, edi
jbe 0x419011
mov ecx, dword [esi + 0x154]
push ecx
push edx
push ebp
push eax
mov eax, dword [ebx + 0x200]
push eax
or edi, 0xffffffff
call fcn.0040b380
mov ecx, eax
add esp, 0x14
jmp 0x419014
mov edi, dword [esi + 0x14]
cmp dword [ebx + 0x1d4], 0
je 0x419054
mov edx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov ecx, dword [ebx + 0x5c]
push edx
mov edx, dword [ebx + 0x58]
push eax
push ecx
push edx
call fcn.00413100
mov ecx, dword [ebx + 0x1d4]
sub ecx, eax
mov eax, dword [esi + 0x1c]
imul eax, eax, 0x3e8
add esp, 0x10
cmp ecx, eax
jle 0x41904e
mov ecx, eax
jmp 0x419054
test ecx, ecx
jns 0x419054
xor ecx, ecx
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call fcn.004250a0
mov edi, eax
call fcn.004130d0
mov ecx, dword [ebx + 0x50]
mov dword [ebx + 0x58], eax
mov eax, dword [ebx + 0x54]
push eax
mov eax, dword [ebx + 0x58]
push ecx
push edx
push eax
mov dword [ebx + 0x5c], edx
call fcn.00413100
mov ebp, dword [esp + 0x48]
add esp, 0x20
cmp eax, dword [ebx + 0x1d4]
jl 0x4190aa
push ebp
call fcn.004267b0
add esp, 4
test eax, eax
jne 0x419266
mov ecx, dword [ebx + 0x58]
mov edx, dword [ebx + 0x5c]
mov dword [ebx + 0x50], ecx
mov dword [ebx + 0x54], edx
cmp edi, 0xffffffff
jne 0x4190fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebp
call fcn.00412440
push eax
push 0x449374
push ebx
call fcn.0040e9d0
mov edi, dword [esp + 0x24]
add esp, 0x14
mov dword [esi + 0xc], 5
test edi, edi
jne 0x41927f
mov eax, dword [esi]
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
mov edx, dword [edx]
xor edi, edi
cmp eax, 3
ja case.default.0x4190f3
jmp dword [eax*4 + 0x41928c]
test edi, edi
jne 0x419169
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [ebx + 0x5c]
mov edi, dword [esi + 0x1c]
push eax
imul edi, edi, 0x3e8
mov eax, dword [ebx + 0x58]
push ecx
push edx
push eax
call fcn.00413100
add esp, 0x10
cmp eax, edi
jle 0x419236
lea eax, [esp + 0x1c]
mov dword [esi + 0xc], 7
mov edi, dword [ebp + 0x3d0]
push eax
call fcn.00432f3b
mov ebp, dword [esp + 0x24]
add esp, 4
cmp ebp, dword [edi + 0x34]
jl 0x4191b2
jg 0x419157
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [edi + 0x30]
jbe 0x4191b2
mov dword [edi + 8], 0xffffff9d
mov dword [edi], 3
jmp 0x4190de
push ebp
call fcn.00418d10
mov edi, eax
add esp, 4
test edi, edi
jne 0x419185
call fcn.004130d0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x419197
mov ecx, dword [ebx + 0x38]
mov dword [eax], ecx
mov edx, dword [ebx + 0x3c]
mov dword [eax + 4], edx
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x4190d6
mov ecx, dword [ebx + 0x40]
mov dword [eax], ecx
mov edx, dword [ebx + 0x44]
mov dword [eax + 4], edx
jmp 0x4190d6
mov eax, dword [edi + 0x1c]
cdq
add eax, dword [edi + 0x38]
lea ecx, [edi + 0x38]
adc edx, dword [ecx + 4]
cmp ebp, edx
jl 0x4190de
jg 0x4191d3
cmp dword [esp + 0x1c], eax
jbe 0x4190de
push ecx
call fcn.00432f3b
add esp, 4
jmp 0x4190de
push ecx
mov edi, esi
call fcn.00418900
add esp, 4
mov edi, eax
jmp 0x419232
push ecx
mov eax, esi
call fcn.00417ed0
add esp, 4
mov edi, eax
jmp 0x419232
call fcn.00418170
mov edi, eax
jmp 0x419232
push str.TFTP_finished
push 0x449514
push edx
call fcn.0040e940
jmp 0x41922f
push str.Internal_state_machine_error
push 0x449374
push edx
call fcn.0040e9d0
mov edi, 0x47
add esp, 0xc
mov dword [esp + 0x10], edi
cmp dword [esi], 3
jne 0x418f60
mov eax, dword [esp + 0x28]
push 0
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
call fcn.0040c410
mov eax, dword [esp + 0x30]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov ecx, 5
mov eax, esi
call fcn.00418c90
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x14
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret