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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, dword [esp + 0x44]
mov ebx, dword [esi]
mov eax, dword [esi + 0xa0]
mov ecx, dword [esi + 0x16c]
push edi
xor ebp, ebp
lea edi, [ebx + 0x2ec]
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x34], edi
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ecx
call fcn.005221e0
mov ecx, dword [esp + 0x4c]
cmp ecx, ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
je 0x523d4c
mov dword [ecx], ebp
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x1c], edi
mov ebp, edi
mov dword [ecx], 0
mov dword [esp + 0x24], 0
mov byte [esp + 0x13], 1
jmp 0x523d73
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x524097
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x5240b0
mov ecx, dword [ebx + 0xa0]
test ecx, ecx
je 0x523dc0
push edx
push eax
call fcn.005221e0
push edx
push eax
call fcn.00522210
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, eax
mov eax, dword [ebx + 0xa0]
jmp 0x523e29
mov ecx, dword [ebx + 0x98]
test ecx, ecx
je 0x523dff
mov edx, dword [esi + 0x94]
mov eax, dword [esi + 0x90]
push edx
push eax
call fcn.005221e0
push edx
push eax
call fcn.00522210
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
mov eax, dword [ebx + 0x98]
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
jmp 0x523e29
push edx
push eax
call fcn.005221e0
push edx
push eax
call fcn.00522210
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [edx + 0x34]
sub eax, ecx
add esp, 0x10
test eax, eax
jle 0x5240d6
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x24]
test ecx, ecx
jne 0x523e9f
mov ecx, dword [esp + 0x30]
push 0x3e8
push 0xffffffffffffffff
push ecx
call fcn.00522050
add esp, 0xc
cmp eax, 0xffffffff
je 0x523e7c
test eax, eax
jne 0x523e9f
push esi
call fcn.00522ef0
add esp, 4
test eax, eax
je 0x524083
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x30
ret
mov dword [esp + 0x18], 0x38
call fcn.0053fe76
mov edx, dword [eax]
push edx
push str.FTP_response_aborted_due_to_select___error:__d
push ebx
call fcn.00521d00
add esp, 0xc
jmp 0x524083
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 0x24]
test esi, esi
je 0x523f0a
mov ecx, eax
mov ecx, dword [ecx + 0x28]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x20], eax
mov ecx, dword [esi + 0x24]
push ecx
call dword [0x5ae5ec]
mov edi, dword [esp + 0x20]
add esp, 4
xor eax, eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x20]
test eax, eax
jg 0x523f44
push str.FTP_response_reading_failed
push ebx
mov byte [esp + 0x1b], 0
mov dword [esp + 0x20], 0x38
call fcn.00521d00
add esp, 8
jmp 0x524083
mov ecx, dword [esp + 0x44]
mov esi, dword [ecx]
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x34]
mov eax, 0x4000
sub eax, esi
push eax
mov eax, dword [esp + 0x50]
push edi
push edx
push eax
call fcn.005219c0
add esp, 0x14
test eax, eax
jl 0x524083
je 0x523ee2
mov byte [esp + 0x13], 0
jmp 0x524083
mov ecx, dword [esp + 0x48]
add dword [ecx + 0x68], eax
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx]
add edx, eax
test eax, eax
mov dword [ecx], edx
mov dword [esp + 0x28], 0
jle 0x524083
mov esi, dword [esp + 0x24]
mov cl, byte [edi]
inc esi
cmp cl, 0xa
mov dword [esp + 0x24], esi
jne 0x523ffb
mov al, byte [ebx + 0x1a0]
test al, al
je 0x523f95
mov ecx, dword [esp + 0x48]
push ecx
push esi
push ebp
push 1
push ebx
call fcn.00521a60
add esp, 0x14
push esi
push ebp
push 2
push ebx
call fcn.00521ec0
add esp, 0x10
test eax, eax
mov dword [esp + 0x18], eax
jne 0x5240ce
cmp esi, 3
jle 0x523fec
movsx edx, byte [ebp]
push edx
call fcn.0053eabf
add esp, 4
test eax, eax
je 0x523fec
movsx eax, byte [ebp + 1]
push eax
call fcn.0053eabf
add esp, 4
test eax, eax
je 0x523fec
movsx ecx, byte [ebp + 2]
push ecx
call fcn.0053eabf
add esp, 4
test eax, eax
je 0x523fec
cmp byte [ebp + 3], 0x20
je 0x524013
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], 0
lea ebp, [edi + 1]
mov ecx, dword [esp + 0x28]
inc edi
inc ecx
cmp ecx, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], ecx
jl 0x523f65
jmp 0x524083
cmp ebp, edi
mov eax, ebp
jae 0x524030
mov ecx, dword [esp + 0x34]
sub ecx, ebp
nop
mov dl, byte [eax]
mov byte [ecx + eax], dl
mov edx, dword [esp + 0x1c]
inc eax
cmp eax, edx
jb 0x524020
mov edi, edx
mov ecx, dword [esp + 0x28]
mov byte [eax], 0
mov eax, dword [esp + 0x20]
inc ecx
cmp ecx, eax
mov byte [esp + 0x13], 0
lea ebp, [edi + 1]
je 0x524083
mov esi, dword [esp + 0x14]
sub eax, ecx
cdq
push eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], edx
call dword [0x5ae5e8]
add esp, 4
test eax, eax
mov dword [esi + 0x24], eax
je 0x5240f1
mov ecx, dword [esi + 0x28]
mov edx, ecx
shr ecx, 2
mov esi, ebp
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x44]
cmp dword [eax], 0x4000
mov esi, dword [esp + 0x48]
jl 0x523d6b
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x5240b0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0053c6a5
add esp, 4
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x5240be
mov edx, dword [esp + 0x2c]
mov dword [eax], edx
mov eax, dword [esi]
mov ecx, dword [esp + 0x2c]
mov dword [eax + 0x8388], ecx
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
push str.FTP_response_timeout
push ebx
call fcn.00521d00
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 0x1c
pop ebx
add esp, 0x30
ret
pop edi
pop esi
pop ebp
mov eax, 0x1b
pop ebx
add esp, 0x30
ret